mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Add icon translations to Pi-hole (#112180)
This commit is contained in:
parent
1d936e9bbf
commit
2397501776
@ -41,7 +41,6 @@ BINARY_SENSOR_TYPES: tuple[PiHoleBinarySensorEntityDescription, ...] = (
|
||||
PiHoleBinarySensorEntityDescription(
|
||||
key="status",
|
||||
translation_key="status",
|
||||
icon="mdi:pi-hole",
|
||||
state_value=lambda api: bool(api.data.get("status") == "enabled"),
|
||||
),
|
||||
)
|
||||
|
41
homeassistant/components/pi_hole/icons.json
Normal file
41
homeassistant/components/pi_hole/icons.json
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"entity": {
|
||||
"binary_sensor": {
|
||||
"status": {
|
||||
"default": "mdi:pi-hole"
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
"ads_blocked_today": {
|
||||
"default": "mdi:close-octagon-outline"
|
||||
},
|
||||
"ads_percentage_today": {
|
||||
"default": "mdi:close-octagon-outline"
|
||||
},
|
||||
"clients_ever_seen": {
|
||||
"default": "mdi:account-outline"
|
||||
},
|
||||
"dns_queries_today": {
|
||||
"default": "mdi:comment-question-outline"
|
||||
},
|
||||
"domains_being_blocked": {
|
||||
"default": "mdi:block-helper"
|
||||
},
|
||||
"queries_cached": {
|
||||
"default": "mdi:comment-question-outline"
|
||||
},
|
||||
"queries_forwarded": {
|
||||
"default": "mdi:comment-question-outline"
|
||||
},
|
||||
"unique_clients": {
|
||||
"default": "mdi:account-outline"
|
||||
},
|
||||
"unique_domains": {
|
||||
"default": "mdi:domain"
|
||||
}
|
||||
}
|
||||
},
|
||||
"services": {
|
||||
"disable": "mdi:server-off"
|
||||
}
|
||||
}
|
@ -19,55 +19,46 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
||||
key="ads_blocked_today",
|
||||
translation_key="ads_blocked_today",
|
||||
native_unit_of_measurement="ads",
|
||||
icon="mdi:close-octagon-outline",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="ads_percentage_today",
|
||||
translation_key="ads_percentage_today",
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
icon="mdi:close-octagon-outline",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="clients_ever_seen",
|
||||
translation_key="clients_ever_seen",
|
||||
native_unit_of_measurement="clients",
|
||||
icon="mdi:account-outline",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="dns_queries_today",
|
||||
translation_key="dns_queries_today",
|
||||
native_unit_of_measurement="queries",
|
||||
icon="mdi:comment-question-outline",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="domains_being_blocked",
|
||||
translation_key="domains_being_blocked",
|
||||
native_unit_of_measurement="domains",
|
||||
icon="mdi:block-helper",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="queries_cached",
|
||||
translation_key="queries_cached",
|
||||
native_unit_of_measurement="queries",
|
||||
icon="mdi:comment-question-outline",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="queries_forwarded",
|
||||
translation_key="queries_forwarded",
|
||||
native_unit_of_measurement="queries",
|
||||
icon="mdi:comment-question-outline",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="unique_clients",
|
||||
translation_key="unique_clients",
|
||||
native_unit_of_measurement="clients",
|
||||
icon="mdi:account-outline",
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="unique_domains",
|
||||
translation_key="unique_domains",
|
||||
native_unit_of_measurement="domains",
|
||||
icon="mdi:domain",
|
||||
),
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user