Skip to content

Commit

Permalink
Merge pull request #177 from Padanian/main
Browse files Browse the repository at this point in the history
First commit and one fix
  • Loading branch information
pail23 authored Jan 21, 2024
2 parents 0586ce1 + 1b9beec commit 5026298
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ scripts.yaml
secrets.yaml

config/*
!config/configuration.yaml
!config/configuration.yaml
/.vs
20 changes: 16 additions & 4 deletions custom_components/stiebel_eltron_isg/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down
39 changes: 39 additions & 0 deletions custom_components/stiebel_eltron_isg/translations/it.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
}
}

0 comments on commit 5026298

Please sign in to comment.