mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 06:47:09 +00:00
Add icon translations to Electric Kiwi (#111422)
This commit is contained in:
parent
e366763eb2
commit
33cb54b888
18
homeassistant/components/electric_kiwi/icons.json
Normal file
18
homeassistant/components/electric_kiwi/icons.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"entity": {
|
||||||
|
"sensor": {
|
||||||
|
"total_running_balance": {
|
||||||
|
"default": "mdi:currency-usd"
|
||||||
|
},
|
||||||
|
"total_current_balance": {
|
||||||
|
"default": "mdi:currency-usd"
|
||||||
|
},
|
||||||
|
"next_billing_date": {
|
||||||
|
"default": "mdi:calendar"
|
||||||
|
},
|
||||||
|
"hop_power_savings": {
|
||||||
|
"default": "mdi:percent"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -52,7 +52,6 @@ ACCOUNT_SENSOR_TYPES: tuple[ElectricKiwiAccountSensorEntityDescription, ...] = (
|
|||||||
ElectricKiwiAccountSensorEntityDescription(
|
ElectricKiwiAccountSensorEntityDescription(
|
||||||
key=ATTR_TOTAL_RUNNING_BALANCE,
|
key=ATTR_TOTAL_RUNNING_BALANCE,
|
||||||
translation_key="total_running_balance",
|
translation_key="total_running_balance",
|
||||||
icon="mdi:currency-usd",
|
|
||||||
device_class=SensorDeviceClass.MONETARY,
|
device_class=SensorDeviceClass.MONETARY,
|
||||||
state_class=SensorStateClass.TOTAL,
|
state_class=SensorStateClass.TOTAL,
|
||||||
native_unit_of_measurement=CURRENCY_DOLLAR,
|
native_unit_of_measurement=CURRENCY_DOLLAR,
|
||||||
@ -61,7 +60,6 @@ ACCOUNT_SENSOR_TYPES: tuple[ElectricKiwiAccountSensorEntityDescription, ...] = (
|
|||||||
ElectricKiwiAccountSensorEntityDescription(
|
ElectricKiwiAccountSensorEntityDescription(
|
||||||
key=ATTR_TOTAL_CURRENT_BALANCE,
|
key=ATTR_TOTAL_CURRENT_BALANCE,
|
||||||
translation_key="total_current_balance",
|
translation_key="total_current_balance",
|
||||||
icon="mdi:currency-usd",
|
|
||||||
device_class=SensorDeviceClass.MONETARY,
|
device_class=SensorDeviceClass.MONETARY,
|
||||||
state_class=SensorStateClass.TOTAL,
|
state_class=SensorStateClass.TOTAL,
|
||||||
native_unit_of_measurement=CURRENCY_DOLLAR,
|
native_unit_of_measurement=CURRENCY_DOLLAR,
|
||||||
@ -70,7 +68,6 @@ ACCOUNT_SENSOR_TYPES: tuple[ElectricKiwiAccountSensorEntityDescription, ...] = (
|
|||||||
ElectricKiwiAccountSensorEntityDescription(
|
ElectricKiwiAccountSensorEntityDescription(
|
||||||
key=ATTR_NEXT_BILLING_DATE,
|
key=ATTR_NEXT_BILLING_DATE,
|
||||||
translation_key="next_billing_date",
|
translation_key="next_billing_date",
|
||||||
icon="mdi:calendar",
|
|
||||||
device_class=SensorDeviceClass.DATE,
|
device_class=SensorDeviceClass.DATE,
|
||||||
value_func=lambda account_balance: datetime.strptime(
|
value_func=lambda account_balance: datetime.strptime(
|
||||||
account_balance.next_billing_date, "%Y-%m-%d"
|
account_balance.next_billing_date, "%Y-%m-%d"
|
||||||
@ -79,7 +76,6 @@ ACCOUNT_SENSOR_TYPES: tuple[ElectricKiwiAccountSensorEntityDescription, ...] = (
|
|||||||
ElectricKiwiAccountSensorEntityDescription(
|
ElectricKiwiAccountSensorEntityDescription(
|
||||||
key=ATTR_HOP_PERCENTAGE,
|
key=ATTR_HOP_PERCENTAGE,
|
||||||
translation_key="hop_power_savings",
|
translation_key="hop_power_savings",
|
||||||
icon="mdi:percent",
|
|
||||||
native_unit_of_measurement=PERCENTAGE,
|
native_unit_of_measurement=PERCENTAGE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
value_func=lambda account_balance: float(
|
value_func=lambda account_balance: float(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user