hass-weatherflow2mqtt icon indicating copy to clipboard operation
hass-weatherflow2mqtt copied to clipboard

Add "online" state to hub status?

Open FlaMike opened this issue 1 year ago • 1 comments

New Feature

My hub goes offline regularly. The folks at Weatherflow have not been able to resolve my issue. Unplugging the hub and plugging it back in brings the hub back online.

If there was an indicator as to the hub's online status available via weatherflow2mqtt, I could create an automation that toggles the hub's power using a smart plug & get the hub back online. I've looked at the status reported by the hub in weatherflow2mqtt, but have not found an indicator of the hub's online status.

If it's possible to add an online indicator I would appreciate it greatly.

Thank you for your consideration and this super project!

Additional context

No response

FlaMike avatar Apr 10 '23 13:04 FlaMike

Assuming you're using HomeAssistant, you should be able to make a template sensor for this in the meantime. It looks like the status entity updates frequently. Here's an example that would create a binary_sensor showing on/off if the device has updated the status value in the last 10 minutes

`- platform: template sensors: weather_station_status: friendly_name: "Weather Station Status" device_class: problem value_template: > {% if (states.sensor.tempest_st_00007277_temperature.last_updated | as_local) > (now() - timedelta(minutes=10)) %} false {%else%} true {%endif%}

`

craigwitter avatar Jun 13 '23 11:06 craigwitter