mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Add icon translations to FiveM (#111539)
This commit is contained in:
parent
cd9219d4c6
commit
dfd8179a2d
@ -5,10 +5,6 @@ ATTR_RESOURCES_LIST = "resources_list"
|
|||||||
|
|
||||||
DOMAIN = "fivem"
|
DOMAIN = "fivem"
|
||||||
|
|
||||||
ICON_PLAYERS_MAX = "mdi:account-multiple"
|
|
||||||
ICON_PLAYERS_ONLINE = "mdi:account-multiple"
|
|
||||||
ICON_RESOURCES = "mdi:playlist-check"
|
|
||||||
|
|
||||||
MANUFACTURER = "Cfx.re"
|
MANUFACTURER = "Cfx.re"
|
||||||
|
|
||||||
NAME_PLAYERS_MAX = "Players Max"
|
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_PLAYERS_LIST,
|
||||||
ATTR_RESOURCES_LIST,
|
ATTR_RESOURCES_LIST,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
ICON_PLAYERS_MAX,
|
|
||||||
ICON_PLAYERS_ONLINE,
|
|
||||||
ICON_RESOURCES,
|
|
||||||
NAME_PLAYERS_MAX,
|
NAME_PLAYERS_MAX,
|
||||||
NAME_PLAYERS_ONLINE,
|
NAME_PLAYERS_ONLINE,
|
||||||
NAME_RESOURCES,
|
NAME_RESOURCES,
|
||||||
@ -33,20 +30,17 @@ SENSORS: tuple[FiveMSensorEntityDescription, ...] = (
|
|||||||
FiveMSensorEntityDescription(
|
FiveMSensorEntityDescription(
|
||||||
key=NAME_PLAYERS_MAX,
|
key=NAME_PLAYERS_MAX,
|
||||||
translation_key="max_players",
|
translation_key="max_players",
|
||||||
icon=ICON_PLAYERS_MAX,
|
|
||||||
native_unit_of_measurement=UNIT_PLAYERS_MAX,
|
native_unit_of_measurement=UNIT_PLAYERS_MAX,
|
||||||
),
|
),
|
||||||
FiveMSensorEntityDescription(
|
FiveMSensorEntityDescription(
|
||||||
key=NAME_PLAYERS_ONLINE,
|
key=NAME_PLAYERS_ONLINE,
|
||||||
translation_key="online_players",
|
translation_key="online_players",
|
||||||
icon=ICON_PLAYERS_ONLINE,
|
|
||||||
native_unit_of_measurement=UNIT_PLAYERS_ONLINE,
|
native_unit_of_measurement=UNIT_PLAYERS_ONLINE,
|
||||||
extra_attrs=[ATTR_PLAYERS_LIST],
|
extra_attrs=[ATTR_PLAYERS_LIST],
|
||||||
),
|
),
|
||||||
FiveMSensorEntityDescription(
|
FiveMSensorEntityDescription(
|
||||||
key=NAME_RESOURCES,
|
key=NAME_RESOURCES,
|
||||||
translation_key="resources",
|
translation_key="resources",
|
||||||
icon=ICON_RESOURCES,
|
|
||||||
native_unit_of_measurement=UNIT_RESOURCES,
|
native_unit_of_measurement=UNIT_RESOURCES,
|
||||||
extra_attrs=[ATTR_RESOURCES_LIST],
|
extra_attrs=[ATTR_RESOURCES_LIST],
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user