#I can use the coordinator here right? I
1 messages ยท Page 1 of 1 (latest)
I guess I need @young musk input here ๐
hi
๐
Hmm
I think its strange to have an event entity to say like
stuff got updated
without answering the question what got updated
This is like whatsapp giving you a notification: "You may have new messages"
It does that sometimes ๐คฃ
and its annoying lol
When there is bad connection
yep
But I think that is an annoying pattern, so preferably we also should not introduce that here imo
Yes you're right
So what do you think we can do here? The only thing I can think of is a timer trigger that will call the service each time.. but I'm not sure how I compare the results?
And what if you just send an event on every change, with the old status and the new status of the package, like the event sent for an entity state change.
Then in the automation an event trigger can be used
that event will hold both data? old + new?
This is an example of a state_changed event, as you can see it holds the new and old state
event_type: state_changed
data:
entity_id: sensor.power_production_phase_l3
old_state:
entity_id: sensor.power_production_phase_l3
state: "0.581"
attributes:
state_class: measurement
unit_of_measurement: kW
device_class: power
friendly_name: Electricity Meter Energieproductie Fase L3
last_changed: "2024-05-20T06:59:06.942414+00:00"
last_reported: "2024-05-20T06:59:06.942414+00:00"
last_updated: "2024-05-20T06:59:06.942414+00:00"
context:
id: 01HYACQYHYDY8AH8NVRKGX1XQ4
parent_id: null
user_id: null
new_state:
entity_id: sensor.power_production_phase_l3
state: "0.58"
attributes:
state_class: measurement
unit_of_measurement: kW
device_class: power
friendly_name: Electricity Meter Energieproductie Fase L3
last_changed: "2024-05-20T06:59:12.965140+00:00"
last_reported: "2024-05-20T06:59:12.965140+00:00"
last_updated: "2024-05-20T06:59:12.965140+00:00"
context:
id: 01HYACR4E5P0Z9HTXHKZ4FQFF3
parent_id: null
user_id: null
origin: LOCAL
time_fired: "2024-05-20T06:59:12.965140+00:00"
context:
id: 01HYACR4E5P0Z9HTXHKZ4FQFF3
parent_id: null
user_id: null
@young musk this looks good right?
@fresh nymph do you know of an integration that does this today? So I can have a refrence to the code
Where does this come from
I have some time to dive later