diff --git a/.gitignore b/.gitignore index d9161f2..6e82d97 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,5 @@ scripts.yaml secrets.yaml config/* -!config/configuration.yaml \ No newline at end of file +!config/configuration.yaml +/.vs diff --git a/custom_components/stiebel_eltron_isg/sensor.py b/custom_components/stiebel_eltron_isg/sensor.py index ef804e3..2f6dc94 100644 --- a/custom_components/stiebel_eltron_isg/sensor.py +++ b/custom_components/stiebel_eltron_isg/sensor.py @@ -105,6 +105,18 @@ def create_energy_entity_description(name, key, icon): device_class=SensorDeviceClass.ENERGY, ) + def create_daily_energy_entity_description(name, key, icon): + """Create an entry description for a energy sensor.""" + return SensorEntityDescription( + key, + name=name, + native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, + icon=icon, + has_entity_name=True, + state_class=SensorStateClass.TOTAL, + device_class=SensorDeviceClass.ENERGY, + ) + def create_humidity_entity_description(name, key): """Create an entry description for a humidity sensor.""" @@ -240,7 +252,7 @@ def create_volume_stream_entity_description(name, key): ENERGY_SENSOR_TYPES = [ - create_energy_entity_description( + create_daily_energy_entity_description( "Produced Heating Today", PRODUCED_HEATING_TODAY, "mdi:radiator", @@ -250,7 +262,7 @@ def create_volume_stream_entity_description(name, key): PRODUCED_HEATING_TOTAL, "mdi:radiator", ), - create_energy_entity_description( + create_daily_energy_entity_description( "Produced Water Heating Today", PRODUCED_WATER_HEATING_TODAY, "mdi:water-boiler", @@ -260,7 +272,7 @@ def create_volume_stream_entity_description(name, key): PRODUCED_WATER_HEATING_TOTAL, "mdi:water-boiler", ), - create_energy_entity_description( + create_daily_energy_entity_description( "Consumed Heating Today", CONSUMED_HEATING_TODAY, "mdi:lightning-bolt", @@ -270,7 +282,7 @@ def create_volume_stream_entity_description(name, key): CONSUMED_HEATING_TOTAL, "mdi:lightning-bolt", ), - create_energy_entity_description( + create_daily_energy_entity_description( "Consumed Water Heating Today", CONSUMED_WATER_HEATING_TODAY, "mdi:lightning-bolt", diff --git a/custom_components/stiebel_eltron_isg/translations/it.json b/custom_components/stiebel_eltron_isg/translations/it.json new file mode 100644 index 0000000..b1afad8 --- /dev/null +++ b/custom_components/stiebel_eltron_isg/translations/it.json @@ -0,0 +1,39 @@ +{ + "config": { + "step": { + "user": { + "description": "Se hai bisogno di aiuto con la configurazione, dai un'occhiata qui: https://github.com/pail23/stiebel_eltron_isg", + "data": { + "host": "L'indirizzo IP del tuo ISG", + "port": "La porta TCP a cui connettersi all'ISG", + "scan_interval": "La frequenza di scansione dei registri Modbus in secondi" + } + } + }, + "error": { + "already_configured": "Il dispositivo è già configurato", + "invalid_host_IP": "Indirizzo IP host non valido" + }, + "abort": { + "already_configured": "Il dispositivo è già configurato" + } + }, + "entity": { + "climate": { + "climate": { + "state_attributes": { + "preset_mode": { + "state": { + "water_heating": "Riscaldamento dell'acqua", + "emergency": "Emergenza", + "program": "Programma", + "ready": "Pronto", + "auto": "Automatico", + "manual": "Manuale" + } + } + } + } + } + } +}