diff --git a/homeassistant/components/fireservicerota/binary_sensor.py b/homeassistant/components/fireservicerota/binary_sensor.py index 27f2c4a4526..d2f4e2e11f2 100644 --- a/homeassistant/components/fireservicerota/binary_sensor.py +++ b/homeassistant/components/fireservicerota/binary_sensor.py @@ -49,23 +49,10 @@ class ResponseBinarySensor(CoordinatorEntity, BinarySensorEntity): self._client = client self._attr_unique_id = f"{entry.unique_id}_Duty" - self._state: bool | None = None - - @property - def icon(self) -> str: - """Return the icon to use in the frontend.""" - if self._state: - return "mdi:calendar-check" - - return "mdi:calendar-remove" - @property def is_on(self) -> bool | None: """Return the state of the binary sensor.""" - - self._state = self._client.on_duty - - return self._state + return self._client.on_duty @property def extra_state_attributes(self) -> dict[str, Any]: diff --git a/homeassistant/components/fireservicerota/icons.json b/homeassistant/components/fireservicerota/icons.json new file mode 100644 index 00000000000..8de4c444ca8 --- /dev/null +++ b/homeassistant/components/fireservicerota/icons.json @@ -0,0 +1,12 @@ +{ + "entity": { + "binary_sensor": { + "duty": { + "default": "mdi:calendar-remove", + "state": { + "on": "mdi:calendar-check" + } + } + } + } +}