mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 00:37:53 +00:00
Add icon translations to Whois (#112356)
This commit is contained in:
parent
6be2fa1293
commit
a23dbe4727
24
homeassistant/components/whois/icons.json
Normal file
24
homeassistant/components/whois/icons.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"admin": {
|
||||
"default": "mdi:account-star"
|
||||
},
|
||||
"days_until_expiration": {
|
||||
"default": "mdi:calendar-clock"
|
||||
},
|
||||
"owner": {
|
||||
"default": "mdi:account"
|
||||
},
|
||||
"registrant": {
|
||||
"default": "mdi:account-edit"
|
||||
},
|
||||
"registrar": {
|
||||
"default": "mdi:store"
|
||||
},
|
||||
"reseller": {
|
||||
"default": "mdi:store"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -61,7 +61,6 @@ SENSORS: tuple[WhoisSensorEntityDescription, ...] = (
|
||||
WhoisSensorEntityDescription(
|
||||
key="admin",
|
||||
translation_key="admin",
|
||||
icon="mdi:account-star",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
entity_registry_enabled_default=False,
|
||||
value_fn=lambda domain: getattr(domain, "admin", None),
|
||||
@ -76,7 +75,6 @@ SENSORS: tuple[WhoisSensorEntityDescription, ...] = (
|
||||
WhoisSensorEntityDescription(
|
||||
key="days_until_expiration",
|
||||
translation_key="days_until_expiration",
|
||||
icon="mdi:calendar-clock",
|
||||
native_unit_of_measurement=UnitOfTime.DAYS,
|
||||
value_fn=_days_until_expiration,
|
||||
),
|
||||
@ -97,7 +95,6 @@ SENSORS: tuple[WhoisSensorEntityDescription, ...] = (
|
||||
WhoisSensorEntityDescription(
|
||||
key="owner",
|
||||
translation_key="owner",
|
||||
icon="mdi:account",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
entity_registry_enabled_default=False,
|
||||
value_fn=lambda domain: getattr(domain, "owner", None),
|
||||
@ -105,7 +102,6 @@ SENSORS: tuple[WhoisSensorEntityDescription, ...] = (
|
||||
WhoisSensorEntityDescription(
|
||||
key="registrant",
|
||||
translation_key="registrant",
|
||||
icon="mdi:account-edit",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
entity_registry_enabled_default=False,
|
||||
value_fn=lambda domain: getattr(domain, "registrant", None),
|
||||
@ -113,7 +109,6 @@ SENSORS: tuple[WhoisSensorEntityDescription, ...] = (
|
||||
WhoisSensorEntityDescription(
|
||||
key="registrar",
|
||||
translation_key="registrar",
|
||||
icon="mdi:store",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
entity_registry_enabled_default=False,
|
||||
value_fn=lambda domain: domain.registrar if domain.registrar else None,
|
||||
@ -121,7 +116,6 @@ SENSORS: tuple[WhoisSensorEntityDescription, ...] = (
|
||||
WhoisSensorEntityDescription(
|
||||
key="reseller",
|
||||
translation_key="reseller",
|
||||
icon="mdi:store",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
entity_registry_enabled_default=False,
|
||||
value_fn=lambda domain: getattr(domain, "reseller", None),
|
||||
|
@ -3,7 +3,6 @@
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'home-assistant.io Admin',
|
||||
'icon': 'mdi:account-star',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.home_assistant_io_admin',
|
||||
@ -35,7 +34,7 @@
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': 'mdi:account-star',
|
||||
'original_icon': None,
|
||||
'original_name': 'Admin',
|
||||
'platform': 'whois',
|
||||
'previous_unique_id': None,
|
||||
@ -156,7 +155,6 @@
|
||||
'attributes': ReadOnlyDict({
|
||||
'expires': '2023-01-01T00:00:00',
|
||||
'friendly_name': 'home-assistant.io Days until expiration',
|
||||
'icon': 'mdi:calendar-clock',
|
||||
'name_servers': 'ns1.example.com ns2.example.com',
|
||||
'registrar': 'My Registrar',
|
||||
'unit_of_measurement': <UnitOfTime.DAYS: 'd'>,
|
||||
@ -192,7 +190,7 @@
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': 'mdi:calendar-clock',
|
||||
'original_icon': None,
|
||||
'original_name': 'Days until expiration',
|
||||
'platform': 'whois',
|
||||
'previous_unique_id': None,
|
||||
@ -388,7 +386,6 @@
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'home-assistant.io Owner',
|
||||
'icon': 'mdi:account',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.home_assistant_io_owner',
|
||||
@ -420,7 +417,7 @@
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': 'mdi:account',
|
||||
'original_icon': None,
|
||||
'original_name': 'Owner',
|
||||
'platform': 'whois',
|
||||
'previous_unique_id': None,
|
||||
@ -464,7 +461,6 @@
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'home-assistant.io Registrant',
|
||||
'icon': 'mdi:account-edit',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.home_assistant_io_registrant',
|
||||
@ -496,7 +492,7 @@
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': 'mdi:account-edit',
|
||||
'original_icon': None,
|
||||
'original_name': 'Registrant',
|
||||
'platform': 'whois',
|
||||
'previous_unique_id': None,
|
||||
@ -540,7 +536,6 @@
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'home-assistant.io Registrar',
|
||||
'icon': 'mdi:store',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.home_assistant_io_registrar',
|
||||
@ -572,7 +567,7 @@
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': 'mdi:store',
|
||||
'original_icon': None,
|
||||
'original_name': 'Registrar',
|
||||
'platform': 'whois',
|
||||
'previous_unique_id': None,
|
||||
@ -616,7 +611,6 @@
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'home-assistant.io Reseller',
|
||||
'icon': 'mdi:store',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.home_assistant_io_reseller',
|
||||
@ -648,7 +642,7 @@
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': 'mdi:store',
|
||||
'original_icon': None,
|
||||
'original_name': 'Reseller',
|
||||
'platform': 'whois',
|
||||
'previous_unique_id': None,
|
||||
|
Loading…
x
Reference in New Issue
Block a user