Skip to content

Commit

Permalink
Fix #179 Energy-related sensors are not enabled by default
Browse files Browse the repository at this point in the history
  • Loading branch information
nao-pon committed Apr 22, 2024
1 parent 1b1677a commit 19c3d90
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion custom_components/echonetlite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ def _make_update_flags_full_list(self):
# Is enabled CONF_ENABLE_SUPER_ENERGY
_enabled_super_energy = self._user_options.get(
CONF_ENABLE_SUPER_ENERGY,
ENABLE_SUPER_ENERGY_DEFAULT.get(self._eojgc, {}).get(self._eojcc, False),
ENABLE_SUPER_ENERGY_DEFAULT.get(self._eojgc, {}).get(self._eojcc, True),
)
# Some classes use predefined data (Narrowed down items)
flags = EPC_CODES_FOR_UPDATE.get(self._eojgc, {}).get(self._eojcc, None)
Expand Down
2 changes: 0 additions & 2 deletions custom_components/echonetlite/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -1048,8 +1048,6 @@
ENL_HVAC_ROOM_TEMP,
ENL_HVAC_OUT_TEMP,
ENL_HVAC_SILENT_MODE,
ENL_INSTANTANEOUS_POWER,
ENL_CUMULATIVE_POWER,
],
},
0x02: {
Expand Down
2 changes: 1 addition & 1 deletion custom_components/echonetlite/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async def async_setup_entry(hass, config, async_add_entities, discovery_info=Non

if entity["echonetlite"]._user_options.get(
CONF_ENABLE_SUPER_ENERGY,
ENABLE_SUPER_ENERGY_DEFAULT.get(eojgc, {}).get(eojcc, False),
ENABLE_SUPER_ENERGY_DEFAULT.get(eojgc, {}).get(eojcc, True),
):
_enl_super_codes = ENL_SUPER_CODES
else:
Expand Down

0 comments on commit 19c3d90

Please sign in to comment.