From abd31812c4c6f6d0150d8612092511e1cd0079f1 Mon Sep 17 00:00:00 2001 From: snarky-snark Date: Fri, 9 Aug 2019 19:35:29 -0500 Subject: [PATCH] Fix `var.update`. --- custom_components/var/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/custom_components/var/__init__.py b/custom_components/var/__init__.py index dafea09..c8de4f5 100644 --- a/custom_components/var/__init__.py +++ b/custom_components/var/__init__.py @@ -212,7 +212,7 @@ async def async_setup(hass, config): component.async_register_entity_service( SERVICE_UPDATE, SERVICE_UPDATE_SCHEMA, - 'async_update' + 'async_force_update' ) await component.async_add_entities(entities) @@ -414,6 +414,9 @@ async def async_set(self, await self.async_update_ha_state() + async def async_force_update(self): + await self.async_update_ha_state(True) + async def async_update(self): """Update the state and attributes from the templates."""