Thank you for your fast reply.
I belive it is an entity to the integration ‘trafikverket_train’ https://www.home-assistant.io/integrations/trafikverket_train/
Got to study that a bit
Thx for pointing me in some direction
Thank you for your fast reply.
I belive it is an entity to the integration ‘trafikverket_train’ https://www.home-assistant.io/integrations/trafikverket_train/
Got to study that a bit
Thx for pointing me in some direction
What are you trying to do? My automation is only applicable to the issue R5fan was pointing out.
I’m trying to make my trainstop-entities to update more often when they get closer to departure time. It’s quite annoying when you get information that the train is delayed after it is supposed to leave.
It’s specially important for my wife, who could chose to take the bus instead but it departs 1 minute before the train is departing.
I’d just add an update button in the ui for sometehing like that, keep in mind that it might take a moment for the data to refresh. Using the service above will update it. Keep in mind HA will suppress state changes. So if the state of the sensor does not change, you wont see it update after running that service.
Thank you petro. That might be why I thought I had an issue with it.
@petro I tried what you suggested here, but that doesn’t work for me: the integration entity is not updated. Any advice?
My integration entity:
{
"entry_id": "ae7[...]5bd",
"version": 1,
"minor_version": 1,
"domain": "integration",
"title": "wled_energy",
"data": {},
"options": {
"name": "wled_energy",
"source": "sensor.wled_power",
"method": "trapezoidal",
"round": 6.0,
"unit_time": "h",
"unit_prefix": "k"
},
"pref_disable_new_entities": false,
"pref_disable_polling": false,
"source": "user",
"unique_id": null,
"disabled_by": null
}
My automation to force an update:
- id: '171[...]620'
alias: "WLED energy: force update every min"
trigger:
- platform: state
entity_id:
- sensor.wled_energy
for:
hours: 0
minutes: 1
seconds: 0
condition: []
action:
- service: homeassistant.update_entity
metadata: {}
data: {}
target:
entity_id: sensor.wled_energy
mode: single
I even tried this trigger for the automation, but that doesn’t change anything:
...
trigger:
- platform: time_pattern
minutes: /1
...
The result: when wled_power
is constant, wled_energy
is not updated:
Bonus question: will the recent “New state timestamp State.last_reported” change anything regarding this issue?
That’s how HA works. No updates to the value, you won’t see the state change. Calling update entity won’t work because the value is still the same for the power entity.
There are changes that are coming to adjust this behavior. I don’t know when they will be released.
Hmm ok, I’m confused because I thought you were replying with a workaround for this behavior in your comment. But I guess I didn’t understand correctly what/who you were replying to!
Thank you for the quick reply.
Hi Petro, I’m very interested in the changes you are referring to. Is there a pull request or something about this so I can track the PR ?
otiel linked it in their posts bonus question
I\m now at 2024.7.4 and still there doesn’t seem to be a way to force state update that actually works. Home Assistant Core Integration: Update entity
does nothing for me although I do know for certain that the state has changed cause I changed it myself manually using a mobile App. Only after about 5 minutes delay does the state value get updated in HA. The Integration I’m talking about is Netatmo.
Turn on debug logging and see if the update is getting new values
Here’s what I found in the log after changing the brightness and turning the light off:
2024-08-07 21:40:57.378 DEBUG (MainThread) [pyatmo.home] Setting state for home (64fb5729b44721467d0aaeaf) according to {'modules': [{'id': '00:17:88:01:09:dc:50:eb', 'brightness': 36, 'bridge': '00:04:74:39:3e:50'}]}
2024-08-07 21:41:23.337 DEBUG (MainThread) [pyatmo.home] Setting state for home (64fb5729b44721467d0aaeaf) according to {'modules': [{'id': '00:17:88:01:09:dc:50:eb', 'brightness': 18, 'bridge': '00:04:74:39:3e:50'}]}
2024-08-07 21:41:28.691 DEBUG (MainThread) [pyatmo.home] Setting state for home (64fb5729b44721467d0aaeaf) according to {'modules': [{'id': '00:17:88:01:09:dc:50:eb', 'on': False, 'bridge': '00:04:74:39:3e:50'}]}
2024-08-07 21:41:30.603 DEBUG (MainThread) [homeassistant.components.netatmo.data_handler] Calls per hour: 85
My changes are immediately effected by the light, but the GUI isn’t updated with the new values.