I would like to build a Glow devide to get energy and power readings from my ferraris meter - I use a TCRT5000 (in analog mode - digital didn’t work at all) to spot the red part of the disk and have it turn on/off a binary sensor.
Now I would like to use this binary sensor in the pulse_meter (and total_daily_energy) sensors … however, they seem to require me to set a pin
sensor:
- platform: adc
id: pulse_raw
pin: GPIO32
raw: true
internal: true
update_interval: 50ms
filters:
- sliding_window_moving_average:
window_size: 3
send_every: 1
on_value_range:
- above: 345
then:
- binary_sensor.template.publish:
id: one_turn
state: ON
- below: 300
then:
- binary_sensor.template.publish:
id: one_turn
state: OFF
- platform: pulse_meter
name: '${device_name} - Power Consumption'
id: sensor_energy_pulse_meter
unit_of_measurement: 'W'
state_class: measurement
device_class: power
icon: mdi:flash-outline
accuracy_decimals: 0
pin: ${pulse_pin}
# internal_filter: 100ms
filters:
# multiply value = (60 / imp value) * 1000
# - multiply: 60
- lambda: return x * ((60.0 / 75) * 1000.0);
total:
name: '${device_name} - Total Energy'
id: sensor_total_energy
unit_of_measurement: 'kWh'
icon: mdi:circle-slice-3
state_class: total_increasing
device_class: energy
accuracy_decimals: 3
filters:
# multiply value = 1 / imp value
# - multiply: 0.001
- lambda: return x * (1.0 / 75);
binary_sensor:
- platform: template
internal: true
id: one_turn
I’m out of ideas (other than physically connecting one pin to another and pulling it up every time the sensor turns on … I would really like to avoid that)