Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing functionality after switching to native API #317

Closed
escoand opened this issue Jan 10, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@escoand
Copy link
Contributor

commented Jan 10, 2019

Is your feature request related to a problem/use-case? Please describe.
I use a thermistor to measure the temperature and go for one hour into deep sleep afterwards. Until 1.10 I used MQTT with empty will_message and mqtt_subscribe to check if in OTA mode. Now after switching to native API this is not possible anymore. So every time the device is going into deep sleep it and all sensors are immediately reported as unavailable in HA.

mqtt:
  broker: 192.168.1.45
  will_message:
text_sensor:
  - platform: mqtt_subscribe
    id: ota_mode
    topic: thermometer/ota_mode

Describe the solution you'd like:
I would like to have an yaml option to not set all sensors/... as unavailable. This will already happen with expire_after. Additionally should there be a way in HA to set OTA mode - maybe directly in the integration page as a switch.
Maybe this is more a ticket for the HA native api component.

Additional context:

@OttoWinter

This comment has been minimized.

Copy link
Collaborator

commented Jan 11, 2019

If the ESP has deep sleep enabled, Home Assistant will not use the unavailable feature in the native API.

But ... deep sleep isn't really possible with native API yet. HA will only connect to the ESP every 60 seconds, so most of the times the ESP is already back to sleep then. The native API component will need to be restructured a bit to support deep sleep - specifically HA/or some other persistent app needs to be the server, not the ESP.

@OttoWinter

This comment has been minimized.

Copy link
Collaborator

commented Feb 2, 2019

@OttoWinter OttoWinter closed this Feb 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.