I have no idea if this has been asked before (I could not find it) but… I am trying to increment the value of an output, an esp8266_pwm specifically and I am using a binary sensor, a button linked to GPIO0, to register when I want the output to increment. The trouble I am having is that there seems to be no way to either read the level of the output (in order to add to its value) or to just increment it directly.
Is this something that just doesn’t exist yet or am I using the wrong objects?
binary_sensor:
- platform: gpio
pin:
number: GPIO0
inverted: True
id: button
on_click:
then:
- output.set_level:
id: pwm
level: ##### I would like to increment the outputs level here ####
output:
- platform: esp8266_pwm
pin: GPIO13
id: pwm
Thanks!
EDIT: Apologies, I am trying to accomplish this within the ESPHome framework itself. If I can leave home assistant out of the simple automations (incrementing the output level) than that would be preferable.
where did you get this?
Doesn’t look like this is a valid parameter for a gpio binary_sensor.
Might need an automation and as @wellsy mentioned use a counter to increment the value
I think OP is referencing the yaml code for the esphome device (which has limited support for on-device automations) and not homeassistant yaml/autos.
Suggest either moving automation to homeassistant and using a counter or posting question on using esphome framework in one of the support places for that software.
@wellsy That is a home assistant object. I am trying to accomplish this all within ESPHome so that if my home assistant instance goes down or the network is down the button will still increment the pwm level. If I was to go the route of using home assistant objects than I would read the value directly from there.
@lolouk44 It is valid within ESPHome, its not a home assistant object itself
@brahmafear Yes, that is correct. I can move it to home assistant but the wife test says the tech has to work independent of the server or the network (ie. the button should do button things as long as the power is on)
As far as the support places for ESPHome, that is what I thought this was for specifically (I used the esphomelib tags). I have seen most if not all the trouble shooting and questions for esphome here on this forum. If I am in the wrong place than I apologize.