Add icon translations to FiveM (#111539)
This commit is contained in:
parent
cd9219d4c6
commit
dfd8179a2d
3 changed files with 15 additions and 10 deletions
|
@ -5,10 +5,6 @@ ATTR_RESOURCES_LIST = "resources_list"
|
|||
|
||||
DOMAIN = "fivem"
|
||||
|
||||
ICON_PLAYERS_MAX = "mdi:account-multiple"
|
||||
ICON_PLAYERS_ONLINE = "mdi:account-multiple"
|
||||
ICON_RESOURCES = "mdi:playlist-check"
|
||||
|
||||
MANUFACTURER = "Cfx.re"
|
||||
|
||||
NAME_PLAYERS_MAX = "Players Max"
|
||||
|
|
15
homeassistant/components/fivem/icons.json
Normal file
15
homeassistant/components/fivem/icons.json
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"max_players": {
|
||||
"default": "mdi:account-multiple"
|
||||
},
|
||||
"online_players": {
|
||||
"default": "mdi:account-multiple"
|
||||
},
|
||||
"resources": {
|
||||
"default": "mdi:playlist-check"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -11,9 +11,6 @@ from .const import (
|
|||
ATTR_PLAYERS_LIST,
|
||||
ATTR_RESOURCES_LIST,
|
||||
DOMAIN,
|
||||
ICON_PLAYERS_MAX,
|
||||
ICON_PLAYERS_ONLINE,
|
||||
ICON_RESOURCES,
|
||||
NAME_PLAYERS_MAX,
|
||||
NAME_PLAYERS_ONLINE,
|
||||
NAME_RESOURCES,
|
||||
|
@ -33,20 +30,17 @@ SENSORS: tuple[FiveMSensorEntityDescription, ...] = (
|
|||
FiveMSensorEntityDescription(
|
||||
key=NAME_PLAYERS_MAX,
|
||||
translation_key="max_players",
|
||||
icon=ICON_PLAYERS_MAX,
|
||||
native_unit_of_measurement=UNIT_PLAYERS_MAX,
|
||||
),
|
||||
FiveMSensorEntityDescription(
|
||||
key=NAME_PLAYERS_ONLINE,
|
||||
translation_key="online_players",
|
||||
icon=ICON_PLAYERS_ONLINE,
|
||||
native_unit_of_measurement=UNIT_PLAYERS_ONLINE,
|
||||
extra_attrs=[ATTR_PLAYERS_LIST],
|
||||
),
|
||||
FiveMSensorEntityDescription(
|
||||
key=NAME_RESOURCES,
|
||||
translation_key="resources",
|
||||
icon=ICON_RESOURCES,
|
||||
native_unit_of_measurement=UNIT_RESOURCES,
|
||||
extra_attrs=[ATTR_RESOURCES_LIST],
|
||||
),
|
||||
|
|
Loading…
Add table
Reference in a new issue