diff --git a/custom_components/battery_sim/__init__.py b/custom_components/battery_sim/__init__.py index 8590b6d..6f1dfa6 100644 --- a/custom_components/battery_sim/__init__.py +++ b/custom_components/battery_sim/__init__.py @@ -539,7 +539,9 @@ def update_battery(self, import_amount, export_amount): self._sensors[ self._last_import_reading_sensor_data[SIMULATED_SENSOR] ] += net_import + _LOGGER.warning(f"Updating simulated export sensor: baterry: {self._name}, last_export_sensor:{self._last_export_reading_sensor_data}") if self._last_export_reading_sensor_data is not None: + _LOGGER.warning(f"Updating simulated export sensor: baterry: {self._name}, last_export_sensor:{self._last_export_reading_sensor_data}, last_export_sensor[simulated_sensor]:{self._last_export_reading_sensor_data[SIMULATED_SENSOR]}") self._sensors[ self._last_export_reading_sensor_data[SIMULATED_SENSOR] ] += net_export diff --git a/custom_components/battery_sim/translations/en.json b/custom_components/battery_sim/translations/en.json index 46cfdd9..b839cfe 100644 --- a/custom_components/battery_sim/translations/en.json +++ b/custom_components/battery_sim/translations/en.json @@ -13,7 +13,7 @@ "data": { "battery": "Battery model" }, - "description": "Select a battery model to simulate from the list or select custom to create one." + "description": "Select a battery model to simulate from the list or select Custom to create one." }, "custom": { "title": "Custom Battery", @@ -36,7 +36,7 @@ "description": "At least one import and one export meter are required. Meters monitoring solar generation direcly shouldn't be added." }, "tariffMenu": { - "title": "Select tariff type", + "title": "Select Tariff Type", "menu_options": { "no_tariff_info": "No tariff for this meter", "fixed_tariff": "A constant fixed number for the tariff", @@ -45,14 +45,14 @@ "description": "" }, "add_import_meter": { - "title": "Add import meter to battery", + "title": "Add Import Meter To Battery", "data": { "sensor_id": "Energy meter sensor" }, "description": "Select meter sensor" }, "add_export_meter": { - "title": "Add export meter to battery", + "title": "Add Export Meter To Battery", "data": { "sensor_id": "Energy meter sensor" }, @@ -99,46 +99,56 @@ "title": "Edit Meters/Sensors", "menu_options": { "add_import_meter": "Add import meter (measuring energy coming into home from the grid)", - "add_export_meter": "Add export meter (measuring energy leaving into home to the grid)", + "add_export_meter": "Add export meter (measuring energy leaving home to the grid)", "edit_input_tariff": "Edit tariff details for a meter", "delete_input": "Delete a meter" }, - "description": "At least one import and one export meter are required. Meters monitoring solar generation direcly shouldn't be added." + "description": "At least one import and one export meter are required. Meters monitoring solar generation directly shouldn't be used." }, "tariffMenu": { - "title": "Select tariff type", + "title": "Select Tariff Type", "menu_options": { "no_tariff_info": "No tariff for this meter", - "fixed_tariff": "A constant fixed number for the tariff", - "tariff_sensor": "A sensor that contains the value of a tariff varying over time" + "fixed_tariff": "A constant fixed price for the tariff", + "tariff_sensor": "A sensor that represents the value of a tariff varying over time" }, "description": "" }, "add_import_meter": { - "title": "Add import meter to battery", + "title": "Add Import Meter To Battery", "data": { "sensor_id": "Energy meter sensor" }, "description": "Select meter sensor" }, "add_export_meter": { - "title": "Add export meter to battery", + "title": "Add Export Meter To Battery", "data": { "sensor_id": "Energy meter sensor" }, "description": "Select meter sensor" }, + "delete_input": { + "title": "Select Meter To Delete", + "data": {}, + "description": "" + }, + "edit_input_tariff": { + "title": "Select Meter To Edit Tariff For", + "data": {}, + "description": "" + }, "fixed_tariff": { - "title": "Add Fixed Tariff Details", + "title": "Add Fixed Tariff", "data": { - "fixed_tariff": "Fixed tariff value (if applcable)" + "fixed_tariff": "Fixed tariff value" }, "description": "" }, "tariff_sensor": { - "title": "Add Tariff Sensor Details", + "title": "Add Tariff Sensor", "data": { - "tariff_sensor": "Sensor that shows current tariff (if applcable)" + "tariff_sensor": "Sensor that shows current tariff" }, "description": "" } diff --git a/custom_components/battery_sim/translations/nl.json b/custom_components/battery_sim/translations/nl.json index 589d076..0788ce2 100644 --- a/custom_components/battery_sim/translations/nl.json +++ b/custom_components/battery_sim/translations/nl.json @@ -1,56 +1,55 @@ { - "config": { - "abort": { - "already_configured": "Het apparaat is reeds geconfigureerd." - }, - "error": { - "not_float": "Moet een getal zijn" - }, - "flow_title": "Nieuwe batterijsimulatie instellen", - "step": { - "user": { - "title": "Selecteer batterij", - "data": { - "battery": "Batterij model" + "config": { + "abort": { + "already_configured": "Het apparaat is reeds geconfigureerd." }, - "description": "Selecteer het te simuleren model uit de lijst, of maak een aangepast model." - }, - "custom": { - "title": "Aangepaste batterij", - "data": { - "size_kwh": "Batterij capaciteit in kWh", - "max_discharge_rate_kw": "Maximum ontlaadcapaciteit in kW", - "max_charge_rate_kw": "Maximum laadcapaciteit in kW", - "efficiency": "AC-DC-AC efficiëntie (0 to 1)" + "error": { + "not_float": "Moet een getal zijn" }, - "description": "Stel de batterijspecificaties in." - }, - "metertype": { - "title": "Energy meter type", - "data": { - "one_import_one_export": "One import and one export meter", - "two_import_one_export": "Two import and one export meter", - "two_import_two_export": "Two import and two export meter" - }, - "description": "Select the type of energy meter you have. Import meters measure energy coming into your home from the grid. You may have two of these e.g. one for day time and one for night. Export meters measure energy leaving your house to the grid e.g. excess solar generation." - }, - "connectsensors": { - "title": "Connect battery to energy meter sensors", - "data": { - "import_sensor": "Import sensor/meter - binnenkomende energie van het net", - "second_import_sensor": "Second import sensor/meter - e.g. night time or Economy 7", - "export_sensor": "Export sensor/meter - energy sent to grid" - }, - "description": "De batterij zal opladen wanneer de export sensor aangeeft dat stroom teruggeleverd wordt aan het net. De batterij zal ontladen wanneer de import sensor aangeeft dat stroom van het net gehaald wordt." - }, - "connecttariffsensors": { - "title": "Connect sensors for energy tariffs", - "data": { - "energy_import_tariff": "Energietarief entiteit - cost of energy from the grid (£/kWh)", - "energy_export_tariff": "Export tariff/rate - payment for energy exported to grid (£/kWh)" - }, - "description": "For static tariffs it is best to create a helper entity with a fixed value. Currency is determined in home assistant location settings and is usually in base unit (e.g. euro) not subunit (e.g. cents)." - } + "flow_title": "Nieuwe batterijsimulatie instellen", + "step": { + "user": { + "title": "Selecteer batterij", + "data":{ + "battery": "Batterij model" + }, + "description": "Selecteer het te simuleren model uit de lijst, of maak een aangepast model." + }, + "custom": { + "title": "Aangepaste batterij", + "data":{ + "size_kwh": "Batterij capaciteit in kWh", + "max_discharge_rate_kw" : "Maximum ontlaadcapaciteit in kW", + "max_charge_rate_kw": "Maximum laadcapaciteit in kW", + "efficiency": "AC-DC-AC efficiëntie (0 to 1)" + }, + "description": "Stel de batterijspecificaties in." + }, + "metertype":{ + "title": "Energy meter type", + "data":{ + "one_import_one_export" : "One import and one export meter", + "two_import_one_export" : "Two import and one export meter" + }, + "description": "Select the type of energy meter you have. Import meters measure energy coming into your home from the grid. You may have two of these e.g. one for day time and one for night. Export meters measure energy leaving your house to the grid e.g. excess solar generation." + }, + "connectsensors": { + "title": "Connect battery to energy meter sensors", + "data":{ + "import_sensor": "Import sensor/meter - binnenkomende energie van het net", + "second_import_sensor": "Second import sensor/meter - e.g. night time or Economy 7", + "export_sensor" : "Export sensor/meter - energy sent to grid" + }, + "description": "De batterij zal opladen wanneer de export sensor aangeeft dat stroom teruggeleverd wordt aan het net. De batterij zal ontladen wanneer de import sensor aangeeft dat stroom van het net gehaald wordt." + }, + "connecttariffsensors": { + "title": "Connect sensors for energy tariffs", + "data":{ + "energy_import_tariff": "Energietarief entiteit - cost of energy from the grid (£/kWh)", + "energy_export_tariff": "Export tariff/rate - payment for energy exported to grid (£/kWh)" + }, + "description": "For static tariffs it is best to create a helper entity with a fixed value. Currency is determined in home assistant location settings and is usually in base unit (e.g. euro) not subunit (e.g. cents)." + } + } } - } } diff --git a/custom_components/battery_sim/translations/sv.json b/custom_components/battery_sim/translations/sv.json index ef7f3ff..71277c6 100644 --- a/custom_components/battery_sim/translations/sv.json +++ b/custom_components/battery_sim/translations/sv.json @@ -1,56 +1,55 @@ { - "config": { - "abort": { - "already_configured": "Den här enheten är redan konfigurerad." - }, - "error": { - "not_float": "Måste vara en siffra" - }, - "flow_title": "Ställ in nytt simulerat batteri", - "step": { - "user": { - "title": "Välj batteri", - "data": { - "battery": "Batterimodell" + "config": { + "abort": { + "already_configured": "Den här enheten är redan konfigurerad." }, - "description": "Välj en batterimodell att simulera från listan eller välj anpassad för att skapa en ny." - }, - "custom": { - "title": "Anpassat batteri", - "data": { - "size_kwh": "Batteristorlek i kWh", - "max_discharge_rate_kw": "Max urladdningshastighet i kW", - "max_charge_rate_kw": "Max laddningshastighet i kW", - "efficiency": "Round trip efficiency (0 to 1)" + "error": { + "not_float": "Måste vara en siffra" }, - "description": "Ställ in specifikationerna för batteriet." - }, - "metertype": { - "title": "Energy meter type", - "data": { - "one_import_one_export": "One import and one export meter", - "two_import_one_export": "Two import and one export meter", - "two_import_two_export": "Two import and two export meter" - }, - "description": "Select the type of energy meter you have. Import meters measure energy coming into your home from the grid. You may have two of these e.g. one for day time and one for night. Export meters measure energy leaving your house to the grid e.g. excess solar generation." - }, - "connectsensors": { - "title": "Anslut batteri eller energi mätarare", - "data": { - "import_sensor": "Importera senor/mätare - inkommande energi", - "second_import_sensor": "Second import sensor/meter - e.g. night time or Economy 7", - "export_sensor": "Exportera sensor/mätare - producering till elnätet" - }, - "description": "När exportsensorn visar energi som lämnar huset laddas batteriet. När importsensorn visar energi som kommer in i huset från nätet laddas batteriet ur." - }, - "connecttariffsensors": { - "title": "Connect sensors for energy tariffs", - "data": { - "energy_import_tariff": "Import tariff/rate - cost of energy from the grid (£/kWh)", - "energy_export_tariff": "Export tariff/rate - payment for energy exported to grid (£/kWh)" - }, - "description": "For static tariffs it is best to create a helper entity with a fixed value. Currency is determined in home assistant location settings and is usually in base unit (e.g. euro) not subunit (e.g. cents)." - } + "flow_title": "Ställ in nytt simulerat batteri", + "step": { + "user": { + "title": "Välj batteri", + "data":{ + "battery": "Batterimodell" + }, + "description": "Välj en batterimodell att simulera från listan eller välj anpassad för att skapa en ny." + }, + "custom": { + "title": "Anpassat batteri", + "data":{ + "size_kwh": "Batteristorlek i kWh", + "max_discharge_rate_kw" : "Max urladdningshastighet i kW", + "max_charge_rate_kw": "Max laddningshastighet i kW", + "efficiency": "Round trip efficiency (0 to 1)" + }, + "description": "Ställ in specifikationerna för batteriet." + }, + "metertype":{ + "title": "Energy meter type", + "data":{ + "one_import_one_export" : "One import and one export meter", + "two_import_one_export" : "Two import and one export meter" + }, + "description": "Select the type of energy meter you have. Import meters measure energy coming into your home from the grid. You may have two of these e.g. one for day time and one for night. Export meters measure energy leaving your house to the grid e.g. excess solar generation." + }, + "connectsensors": { + "title": "Anslut batteri eller energi mätarare", + "data":{ + "import_sensor": "Importera senor/mätare - inkommande energi", + "second_import_sensor": "Second import sensor/meter - e.g. night time or Economy 7", + "export_sensor" : "Exportera sensor/mätare - producering till elnätet" + }, + "description": "När exportsensorn visar energi som lämnar huset laddas batteriet. När importsensorn visar energi som kommer in i huset från nätet laddas batteriet ur." + }, + "connecttariffsensors": { + "title": "Connect sensors for energy tariffs", + "data":{ + "energy_import_tariff": "Import tariff/rate - cost of energy from the grid (£/kWh)", + "energy_export_tariff": "Export tariff/rate - payment for energy exported to grid (£/kWh)" + }, + "description": "For static tariffs it is best to create a helper entity with a fixed value. Currency is determined in home assistant location settings and is usually in base unit (e.g. euro) not subunit (e.g. cents)." + } + } } - } }