diff --git a/homeassistant/components/volvooncall/__init__.py b/homeassistant/components/volvooncall/__init__.py index c408080524ebed..232ecf477f7652 100644 --- a/homeassistant/components/volvooncall/__init__.py +++ b/homeassistant/components/volvooncall/__init__.py @@ -281,3 +281,8 @@ def device_state_attributes(self): self.instrument.attributes, model=f"{self.vehicle.vehicle_type}/{self.vehicle.model_year}", ) + + @property + def unique_id(self) -> str: + """Return a unique ID.""" + return f"{self.vin}-{self.component}-{self.attribute}" diff --git a/homeassistant/components/volvooncall/switch.py b/homeassistant/components/volvooncall/switch.py index 5beea91c7e3461..da0f61c1d8f4ba 100644 --- a/homeassistant/components/volvooncall/switch.py +++ b/homeassistant/components/volvooncall/switch.py @@ -26,7 +26,9 @@ def is_on(self): async def async_turn_on(self, **kwargs): """Turn the switch on.""" await self.instrument.turn_on() + self.async_write_ha_state() async def async_turn_off(self, **kwargs): """Turn the switch off.""" await self.instrument.turn_off() + self.async_write_ha_state()