diff --git a/homeassistant/components/flo/icons.json b/homeassistant/components/flo/icons.json new file mode 100644 index 00000000000..3164781c1b4 --- /dev/null +++ b/homeassistant/components/flo/icons.json @@ -0,0 +1,18 @@ +{ + "entity": { + "switch": { + "shutoff_valve": { + "default": "mdi:valve-closed", + "state": { + "on": "mdi:valve-open" + } + } + } + }, + "services": { + "set_sleep_mode": "mdi:sleep", + "set_away_mode": "mdi:home-off", + "set_home_mode": "mdi:home", + "run_health_test": "mdi:heart-flash" + } +} diff --git a/homeassistant/components/flo/sensor.py b/homeassistant/components/flo/sensor.py index 6d023731c86..476898c8ef3 100644 --- a/homeassistant/components/flo/sensor.py +++ b/homeassistant/components/flo/sensor.py @@ -21,9 +21,6 @@ from .const import DOMAIN as FLO_DOMAIN from .device import FloDeviceDataUpdateCoordinator from .entity import FloEntity -WATER_ICON = "mdi:water" -GAUGE_ICON = "mdi:gauge" - async def async_setup_entry( hass: HomeAssistant, @@ -60,7 +57,6 @@ async def async_setup_entry( class FloDailyUsageSensor(FloEntity, SensorEntity): """Monitors the daily water usage.""" - _attr_icon = WATER_ICON _attr_native_unit_of_measurement = UnitOfVolume.GALLONS _attr_state_class: SensorStateClass = SensorStateClass.TOTAL_INCREASING _attr_device_class = SensorDeviceClass.WATER @@ -98,7 +94,6 @@ class FloSystemModeSensor(FloEntity, SensorEntity): class FloCurrentFlowRateSensor(FloEntity, SensorEntity): """Monitors the current water flow rate.""" - _attr_icon = GAUGE_ICON _attr_native_unit_of_measurement = UnitOfVolumeFlowRate.GALLONS_PER_MINUTE _attr_state_class: SensorStateClass = SensorStateClass.MEASUREMENT _attr_device_class = SensorDeviceClass.VOLUME_FLOW_RATE diff --git a/homeassistant/components/flo/switch.py b/homeassistant/components/flo/switch.py index 00e5e57498f..62a57c463e2 100644 --- a/homeassistant/components/flo/switch.py +++ b/homeassistant/components/flo/switch.py @@ -75,13 +75,6 @@ class FloSwitch(FloEntity, SwitchEntity): super().__init__("shutoff_valve", device) self._attr_is_on = device.last_known_valve_state == "open" - @property - def icon(self): - """Return the icon to use for the valve.""" - if self.is_on: - return "mdi:valve-open" - return "mdi:valve-closed" - async def async_turn_on(self, **kwargs: Any) -> None: """Open the valve.""" await self._device.api_client.device.open_valve(self._device.id)