tl;dr,
I can change a homeassistant sensor value in esphomelib, but how can that state be published back to home assistant? This is homeassistant sensor using the native api, not mqtt
Using this PR (thanks OttoWinter),
homeassistant native api sensors now work again.
I can send state updates with the input slider in hass and they directly change on my esphomelib display. Good.
I can directly read and minupulate the sensor state with functions like:
What does not work is actually changing the state of the sensor in hass when those buttons are clicked. The state only changes on the esp. I can only find references to updating and publishing new statuses with MQTT, but this is using the Native API.
How can I publish a sensor update back to home assistant?
I have tried that, yes, but it does not change anything. No errors in either hass log or esphomeyaml debug log.
That may be only for MQTT? Besides, it’s my understanding that state changes are published automatically anyway?
I’m still not sure how to do this, or if the native api with homeassistant can be used for two-way publishing.
In the meantime, I was able to sucesfully get my situation working by replacing the native api with mqtt.
HOWEVER, this now exposing my entities twice unless I disable the native api for everything else. Any suggestions?
In case anyone ends up on this thread looking for how to publish an increase/decrease in Brighness back to HA , this is what I’ve now got working - the above was a good pointer, but an integer is required.:
Sure hope a solution can be found for this @RGN01
Been looking for weeks to find a way to do this.
Well done for your efforts. Unfortunately I am still learning so cannot offer any assistance with code sadly.
Following at present