Skip to content

Commit

Permalink
Merge pull request #228 from sockless-coding/summer-mode-2
Browse files Browse the repository at this point in the history
Preset and Nanoe bugfixes
  • Loading branch information
sockless-coding authored Jun 28, 2024
2 parents 8e59941 + 966930b commit e93c91d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion custom_components/panasonic_cc/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"domain": "panasonic_cc",
"name": "Panasonic Comfort Cloud",
"after_dependencies": ["http"],
"version": "1.0.49",
"version": "1.0.50",
"config_flow": true,
"documentation": "https://github.com/sockless-coding/panasonic_cc/",
"dependencies": [],
Expand Down
11 changes: 7 additions & 4 deletions custom_components/panasonic_cc/panasonic.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async def do_update(self):
self._swing_lr_mode = data.parameters.horizontal_swing_mode.name
self._hvac_mode = data.parameters.mode.name
self._eco_mode = data.parameters.eco_mode.name
self._nanoe_mode = data.parameters.nanoe_mode.name
self._nanoe_mode = data.parameters.nanoe_mode

except Exception as e:
_LOGGER.debug("Failed to set data for device {id}".format(**self.device))
Expand Down Expand Up @@ -317,13 +317,16 @@ async def set_preset_mode(self, preset_mode: str) -> None:
"""Set new preset mode."""
_LOGGER.debug("Set %s ecomode %s", self.name, preset_mode)
data = {
"power": constants.Power.On
"power": constants.Power.On,
"eco": constants.EcoMode.Auto
}
if self.in_summer_house_mode and preset_mode != PRESET_8_15:
await self._exit_summer_house_mode(data)

if PRESET_LIST[preset_mode] in self.constants.EcoMode:
data["eco"] = constants.EcoMode[ PRESET_LIST[preset_mode] ]
if preset_mode == PRESET_ECO:
data["eco"] = constants.EcoMode.Quiet
elif preset_mode == PRESET_BOOST:
data["eco"] = constants.EcoMode.Powerful
elif preset_mode == PRESET_8_15:
await self._enter_summer_house_mode()
data["mode"] = constants.OperationMode.Heat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,6 @@ def _load_temperature(self, json):
if 'outTemperature' in json and json['outTemperature'] != constants.INVALID_TEMPERATURE:
self.outside_temperature = json['outTemperature']

if self.inside_temperature is None and self.outside_temperature is not None:
self.inside_temperature = self.outside_temperature
self.outside_temperature = None



def _load_swing_mode(self, json):
if 'airSwingLR' in json:
Expand Down

0 comments on commit e93c91d

Please sign in to comment.