Add icon translations to Abode (#108407)
This commit is contained in:
parent
09be3ffc29
commit
ef7e2cfc08
3 changed files with 10 additions and 6 deletions
|
@ -17,8 +17,6 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
from . import AbodeDevice, AbodeSystem
|
from . import AbodeDevice, AbodeSystem
|
||||||
from .const import DOMAIN
|
from .const import DOMAIN
|
||||||
|
|
||||||
ICON = "mdi:security"
|
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(
|
async def async_setup_entry(
|
||||||
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
|
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
|
||||||
|
@ -33,7 +31,6 @@ async def async_setup_entry(
|
||||||
class AbodeAlarm(AbodeDevice, alarm.AlarmControlPanelEntity):
|
class AbodeAlarm(AbodeDevice, alarm.AlarmControlPanelEntity):
|
||||||
"""An alarm_control_panel implementation for Abode."""
|
"""An alarm_control_panel implementation for Abode."""
|
||||||
|
|
||||||
_attr_icon = ICON
|
|
||||||
_attr_name = None
|
_attr_name = None
|
||||||
_attr_code_arm_required = False
|
_attr_code_arm_required = False
|
||||||
_attr_supported_features = (
|
_attr_supported_features = (
|
||||||
|
|
9
homeassistant/components/abode/icons.json
Normal file
9
homeassistant/components/abode/icons.json
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"entity": {
|
||||||
|
"switch": {
|
||||||
|
"automation": {
|
||||||
|
"default": "mdi:robot"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -17,8 +17,6 @@ from .const import DOMAIN
|
||||||
|
|
||||||
DEVICE_TYPES = [CONST.TYPE_SWITCH, CONST.TYPE_VALVE]
|
DEVICE_TYPES = [CONST.TYPE_SWITCH, CONST.TYPE_VALVE]
|
||||||
|
|
||||||
ICON = "mdi:robot"
|
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(
|
async def async_setup_entry(
|
||||||
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
|
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
|
||||||
|
@ -63,7 +61,7 @@ class AbodeSwitch(AbodeDevice, SwitchEntity):
|
||||||
class AbodeAutomationSwitch(AbodeAutomation, SwitchEntity):
|
class AbodeAutomationSwitch(AbodeAutomation, SwitchEntity):
|
||||||
"""A switch implementation for Abode automations."""
|
"""A switch implementation for Abode automations."""
|
||||||
|
|
||||||
_attr_icon = ICON
|
_attr_translation_key = "automation"
|
||||||
|
|
||||||
async def async_added_to_hass(self) -> None:
|
async def async_added_to_hass(self) -> None:
|
||||||
"""Set up trigger automation service."""
|
"""Set up trigger automation service."""
|
||||||
|
|
Loading…
Add table
Reference in a new issue