mirror of https://github.com/home-assistant/core
Cleanup entity & remove warning (#9606)
* Cleanup entity & remove warning * Update comment
This commit is contained in:
parent
eb2338249f
commit
7c8e7d6eb0
|
@ -180,15 +180,6 @@ class Entity(object):
|
|||
# are used to perform a very specific function. Overwriting these may
|
||||
# produce undesirable effects in the entity's operation.
|
||||
|
||||
def update_ha_state(self, force_refresh=False):
|
||||
"""Update Home Assistant with current state of entity.
|
||||
|
||||
If force_refresh == True will update entity before setting state.
|
||||
"""
|
||||
_LOGGER.warning("'update_ha_state' is deprecated. "
|
||||
"Use 'schedule_update_ha_state' instead.")
|
||||
self.schedule_update_ha_state(force_refresh)
|
||||
|
||||
@asyncio.coroutine
|
||||
def async_update_ha_state(self, force_refresh=False):
|
||||
"""Update Home Assistant with current state of entity.
|
||||
|
@ -207,8 +198,7 @@ class Entity(object):
|
|||
# update entity data
|
||||
if force_refresh:
|
||||
if self._update_warn:
|
||||
_LOGGER.warning("Update for %s is already in progress",
|
||||
self.entity_id)
|
||||
# Update is already in progress.
|
||||
return
|
||||
|
||||
self._update_warn = self.hass.loop.call_later(
|
||||
|
|
Loading…
Reference in New Issue