#sensor value to mqtt
1 messages · Page 1 of 1 (latest)
Why not just do it when the sensor value changes? (state trigger)
thats the case
it changes very oftn and should be transmitted immediately
the question is if it exists another way to do that.
Ah OK. So it's not updating every second, it's updating when the sensor updates which happens to be every second. Gotcha.
jep
Honestly, not through home assistant - if you want to transmit every change, and it's updating that frequently, then there's no real way around just sending the event
is there a way to do that an other way than with an automation?
i need the energy sensor value of the tibber integration as mqtt
As for doing it with less resources (not that an automation running every second is particularly problematic) it depends on the sensor, but publishing directly to mqtt would be easier than reading to ha then republish to mqtt
Ah I see, so virtual sensor not like a esphome device
yes
Why does it need to be updated so instantly, what are you running off it?
the mqtt value is read by opendtuonbattery as energy meter value
and used to to build an "nulleinspeisung" with an hm800
so it should be near realtime as possible
it is a bit slow and i want to know if there are better ways to do that
Well you could bypass home assistant with something like this https://github.com/danielringch/tibber2mqtt
I don't know how effective it is, polling rates etc
i know that, but i dont want to ask the api twice
the ha integration uses the api too
Yeah but the software implementation controls when it queries the api
hm