LAB02-Research / HASS.Agent-Integration

HASS.Agent's Home Assistant integration. Adds notifications and mediaplayer capabilities to HASS.Agent - a Windows based client (companion app) for Home Assistant.
MIT License
101 stars 17 forks source link

Bug: too many updates in paused state #18

Open aksyonov opened 1 year ago

aksyonov commented 1 year ago

The media_player entity has unnecessary updates every 2 seconds when in paused state. The only attribute being updated is media_position_updated_at (current timestamp). This results in a lot of database writes (in my setup the entity with the most updates is a HASS.Agent media_player - more than 100K records for the last 10 days).

Also, as I understand, even in playing state, the media_position_updated_at attribute shouldn't update every 2 seconds - only when media_position is changed (user skipped to a different position in a track), but when playing normally, there should't be any attribute changes.

LAB02-Admin commented 1 year ago

Very sharp, thank you for this @aksyonov, will fix ❤️

heyitsyang commented 9 months ago

I'm seeing the same thing. Aside from the database spam, it also increases load on the MQTT server needlessly. It's very annoying. Please fix soon.

Otherwise a great piece of software.