snarky-snark / home-assistant-variables

A custom Home Assistant component for declaring and setting generic variable entities dynamically.
Apache License 2.0
278 stars 16 forks source link

should use self.async_write_ha_state() #105

Closed pavelkryl closed 7 months ago

pavelkryl commented 10 months ago

When I boot my HA instance I've got quite a lot of warnings like these:

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:702
First occurred: 21:59:01 (10 occurrences)
Last logged: 22:05:31

    Entity var.base_temp_eli (<class 'custom_components.var.Variable'>) is using self.async_update_ha_state(), without enabling force_update. Instead it should use self.async_write_ha_state(), please report it to the author of the 'var' custom integration
    Entity var.base_temp_tobi_nini (<class 'custom_components.var.Variable'>) is using self.async_update_ha_state(), without enabling force_update. Instead it should use self.async_write_ha_state(), please report it to the author of the 'var' custom integration
    Entity var.base_temp_t_m (<class 'custom_components.var.Variable'>) is using self.async_update_ha_state(), without enabling force_update. Instead it should use self.async_write_ha_state(), please report it to the author of the 'var' custom integration
    Entity var.base_temp_panobyvak (<class 'custom_components.var.Variable'>) is using self.async_update_ha_state(), without enabling force_update. Instead it should use self.async_write_ha_state(), please report it to the author of the 'var' custom integration
    Entity var.base_temp_hostovsky_pokoj (<class 'custom_components.var.Variable'>) is using self.async_update_ha_state(), without enabling force_update. Instead it should use self.async_write_ha_state(), please report it to the author of the 'var' custom integration

Could that be fixed please? Thanks!

Swerfer commented 9 months ago

I noticed the same today:

Logger: homeassistant.helpers.entity Source: helpers/entity.py:704 First occurred: 11:36:06 (3 occurrences) Last logged: 12:00:00

Entity var.warmtepomp_temperatuurtrend_woonkamer_offset (<class 'custom_components.var.Variable'>) is using self.async_update_ha_state(), without enabling force_update. Instead it should use self.async_write_ha_state(), please report it to the author of the 'var' custom integration Entity var.warmtepomp_uurkosten (<class 'custom_components.var.Variable'>) is using self.async_update_ha_state(), without enabling force_update. Instead it should use self.async_write_ha_state(), please report it to the author of the 'var' custom integration Entity var.warmtepomp_temperatuurtrend_woonkamer_vorige (<class 'custom_components.var.Variable'>) is using self.async_update_ha_state(), without enabling force_update. Instead it should use self.async_write_ha_state(), please report it to the author of the 'var' custom integration

waldmeisterx commented 8 months ago

Same here in HA 2024.1.6

Logger: homeassistant.helpers.entity Source: helpers/entity.py:904 First occurred: 23:15:43 (4 occurrences) Last logged: 23:15:43

Entity var.n_birthday_days2go (<class 'custom_components.var.Variable'>) is using self.async_update_ha_state(), without enabling force_update. Instead it should use self.async_write_ha_state(), please report it to the author of the 'var' custom integration Entity var.d_birthday_days2go (<class 'custom_components.var.Variable'>) is using self.async_update_ha_state(), without enabling force_update. Instead it should use self.async_write_ha_state(), please report it to the author of the 'var' custom integration Entity var.l_birthday_days2go (<class 'custom_components.var.Variable'>) is using self.async_update_ha_state(), without enabling force_update. Instead it should use self.async_write_ha_state(), please report it to the author of the 'var' custom integration Entity var.s_birthday_days2go (<class 'custom_components.var.Variable'>) is using self.async_update_ha_state(), without enabling force_update. Instead it should use self.async_write_ha_state(), please report it to the author of the 'var' custom integration

snarky-snark commented 7 months ago

Duplicate of #99. Fixed in 0.15.1.