Skip to content

Commit

Permalink
Fix no energy tariff bug
Browse files Browse the repository at this point in the history
Fixes bug causing error when generating a battery with no energy tariff
  • Loading branch information
hif2k1 authored Sep 23, 2022
1 parent 41bd4ed commit 254af28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/battery_sim/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ async def async_step_connectsensors(self, user_input = None):
if user_input is not None:
self._data[CONF_IMPORT_SENSOR] = user_input[CONF_IMPORT_SENSOR]
self._data[CONF_EXPORT_SENSOR] = user_input[CONF_EXPORT_SENSOR]
self._data[CONF_ENERGY_TARIFF] = user_input[CONF_ENERGY_TARIFF]
if CONF_ENERGY_TARIFF in user_input:
self._data[CONF_ENERGY_TARIFF] = user_input[CONF_ENERGY_TARIFF]
self._data[SETUP_TYPE] = CONFIG_FLOW
return self.async_create_entry(title=self._data["name"], data=self._data)

Expand Down

0 comments on commit 254af28

Please sign in to comment.