1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 03:12:20 +01:00

Add action to set total pulses on pulse_meter (#1757)

This commit is contained in:
Jesse Hills
2021-05-14 20:06:31 +12:00
committed by GitHub
parent 00c144daeb
commit 4f6982fbc5
5 changed files with 58 additions and 5 deletions

View File

@@ -247,10 +247,10 @@ ble_client:
id: ble_blah
on_connect:
then:
- switch.turn_on: ble1_status
- switch.turn_on: ble1_status
on_disconnect:
then:
- switch.turn_on: ble1_status
- switch.turn_on: ble1_status
mcp23s08:
- id: 'mcp23s08_hub'
cs_pin: GPIO12
@@ -264,7 +264,7 @@ mcp23s17:
sensor:
- platform: ble_client
ble_client_id: ble_foo
name: "Green iTag btn"
name: 'Green iTag btn'
service_uuid: 'ffe0'
characteristic_uuid: 'ffe1'
descriptor_uuid: 'ffe2'
@@ -658,9 +658,14 @@ sensor:
update_interval: 15s
- platform: pulse_meter
name: 'Pulse Meter'
id: pulse_meter_sensor
pin: GPIO12
internal_filter: 100ms
timeout: 2 min
on_value:
- pulse_meter.set_total_pulses:
id: pulse_meter_sensor
value: 12345
total:
name: 'Pulse Meter Total'
- platform: rotary_encoder
@@ -2037,7 +2042,6 @@ tca9548a:
multiplexer:
id: multiplex0
channel: 0
pcf8574:
- id: 'pcf8574_hub'