#Return Unavailable or 0 when a sensor in a helper is offline
1 messages · Page 1 of 1 (latest)
Also when the power comes back on, it counts everything all at once. I know how to fix that if it's a helper sensor but this is direct from esphome
You need to be clear what you're doing. I don't know what entities you're using, what helpers you're using, how they are configured, etc.
but if your power goes down, then home assistant does as well?
I don't know if how the helper is configured matters much. I just know that if one sensor becomes unavailable, the helper defaults to the last known value instead of becoming unavailable itself
no, HA is running on a tablet with a better that's plugged into a UPS that's plugged into a solar "UPS" and THAT in plugged into the grid
hmm okay. Well you can try setting left riemann sum as the integration method
It's not a helper, that's the problem. It totals energy in the device itself
then there's nothing you can do
welp
ok well you could take the power sensor and add your own left riemann integral sensor
which doesn't really make sense having duplicates
Is there some method by which HA can detect the Emporia is actually offline? f.e. by checking if the emporia's ip is online or something? If so, you can use that information in a template sensor that normally returns the value from the emporia, but when the emporia is offline, the template sensor becomes unavailable.
you can just disable the original energy sensor
it knows emporia is unavailable but the problem is HA just reads the last known value. So if the last known value is 1kw, it'll stay like that
Yes, for a template sensor you decide what value it should return: if the emporia is online: return the value from the emporia, if it is offline, make the sensor unavailable. Then, from that point on, in your automations, dashboards, etc. use the template sensor's value instead of the emporia's value.
I don't know where that option would be
- Settings -> Helpers
- Click the "+ Create helper" button
- Select "Template" -> "Sensor"
- Enter some name into the Name field
- Enter into State field:
{{ states('sensor.your_emporia_sensor_id_here') }} - Select the same unit of measurement that your emporia sensor has
- Select same Device class that your emporia sensor has
- Select same State Class that your emporia sensor has
- Select your Emporia Device
- Open Advanced options
- Enter into the Availability template field:
{{ is_state('sensor.your_emporia_deviceOnline_sensor_id', 'on') }} - Click the Submit button
You will have to provide the proper entity_ids for your setup.
I''ll try