home-assistant-omnik-inverter icon indicating copy to clipboard operation
home-assistant-omnik-inverter copied to clipboard

add Connectivity Status Binary Sensor

Open CFenner opened this issue 1 year ago • 3 comments

I would like to see if my inverter is up & connected.

Detailed description

There is a device_class: connectivity which can be used to display this.

Bildschirmfoto 2022-09-06 um 19 47 02 Bildschirmfoto 2022-09-06 um 19 48 13 Bildschirmfoto 2022-09-06 um 19 46 22

Meanwhile is solved this by adding a template sensor:

name: Bosswerk Veranda Status
state: >-
  {% if states('sensor.bosswerk_veranda_solar_current_power') in ("unavailable", "unknown") -%}
    off
  {%- else -%}
    on
  {%- endif %}
device_class: connectivity

Context

Use in automations.

CFenner avatar Sep 06 '22 19:09 CFenner

So we could do this by checking "do receive data? e.g. status 200 OK?" -> UP, if not -> DOWN. Is that something you could work with?

robbinjanssen avatar Sep 07 '22 06:09 robbinjanssen

Is this unavailable/unknown value thought up by HASS when the integration hasn't provided any value for said entity for some time? We were thinking about driving this connectivity status by a configurable timeout on the requests that are sent by this integration (i.e. we won't get any http 200 replies / data if the inverter is offline/disconnected - if that happens for a couple requests in a row the inverter is likely unreachable).

MarijnS95 avatar Sep 07 '22 07:09 MarijnS95

Is this unavailable/unknown value thought up by HASS when the integration hasn't provided any value for said entity for some time?

I think that is how it works. The idea I had is that with a connectivity entity the status is even displayed when the device is not reachable.

CFenner avatar Sep 12 '22 08:09 CFenner