Skip to content

Commit

Permalink
Merge pull request #296 from sockless-coding/dev
Browse files Browse the repository at this point in the history
Nanoe switch now shows the correct the correct state for ModeG and All
  • Loading branch information
sockless-coding authored Aug 21, 2024
2 parents b73941e + 66f66dd commit b3f0542
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions custom_components/panasonic_cc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
username = conf[CONF_USERNAME]
password = conf[CONF_PASSWORD]
enable_daily_energy_sensor = entry.options.get(CONF_ENABLE_DAILY_ENERGY_SENSOR, DEFAULT_ENABLE_DAILY_ENERGY_SENSOR)
use_panasonic_preset_names = entry.options.get(CONF_USE_PANASONIC_PRESET_NAMES, False)


client = async_get_clientsession(hass)
api = pcomfortcloud.ApiClient(username, password, client)
await api.start_session()
Expand Down
2 changes: 1 addition & 1 deletion custom_components/panasonic_cc/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class PanasonicSwitchEntityDescription(SwitchEntityDescription):
icon="mdi:virus-off",
on_func = lambda builder: builder.set_nanoe_mode(constants.NanoeMode.On),
off_func= lambda builder: builder.set_nanoe_mode(constants.NanoeMode.Off),
get_state = lambda device: device.parameters.nanoe_mode == constants.NanoeMode.On,
get_state = lambda device: device.parameters.nanoe_mode in [constants.NanoeMode.On, constants.NanoeMode.ModeG, constants.NanoeMode.All],
is_available = lambda device: device.has_nanoe
)
ECONAVI_DESCRIPTION = PanasonicSwitchEntityDescription(
Expand Down

0 comments on commit b3f0542

Please sign in to comment.