Skip to content

Commit

Permalink
feat: introduce climate entities
Browse files Browse the repository at this point in the history
refactor: commented out redundant extra channel attribute setting

chore: bump version number (v2024.3.1 -> v2024.3.2)
  • Loading branch information
alryaz committed Mar 12, 2024
1 parent bb6be9a commit 02199ad
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 3 deletions.
12 changes: 12 additions & 0 deletions custom_components/pandora_cas/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,18 @@ class PandoraCASButtonEntityDescription(
entity_category=EntityCategory.DIAGNOSTIC,
allow_simultaneous_presses=False,
),
PandoraCASButtonEntityDescription(
key="climate_comfort",
name="Climate Comfort",
icon="mdi:palm-tree",
command=CommandID.CLIMATE_MODE_COMFORT,
),
PandoraCASButtonEntityDescription(
key="climate_interior_ventilation",
name="Climate Interior Ventilation",
icon="mdi:fan",
command=CommandID.CLIMATE_MODE_VENT,
),
]


Expand Down
4 changes: 2 additions & 2 deletions custom_components/pandora_cas/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"issue_tracker": "https://github.com/alryaz/hass-pandora-cas/issues",
"requirements": [
"haversine~=2.8.0",
"pandora-cas==0.0.2"
"pandora-cas==0.0.3"
],
"version": "2024.3.1"
"version": "2024.3.2"
}
3 changes: 3 additions & 0 deletions custom_components/pandora_cas/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class PandoraCASNumberEntityDescription(
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=NumberDeviceClass.TEMPERATURE,
mode=NumberMode.SLIDER,
entity_registry_enabled_default=False,
),
PandoraCASNumberEntityDescription(
key="climate_seat_heating",
Expand All @@ -71,6 +72,7 @@ class PandoraCASNumberEntityDescription(
native_max_value=0,
native_step=1,
mode=NumberMode.SLIDER,
entity_registry_enabled_default=False,
),
PandoraCASNumberEntityDescription(
key="climate_seat_ventilation",
Expand All @@ -83,6 +85,7 @@ class PandoraCASNumberEntityDescription(
native_max_value=0,
native_step=1,
mode=NumberMode.SLIDER,
entity_registry_enabled_default=False,
),
]

Expand Down
54 changes: 53 additions & 1 deletion custom_components/pandora_cas/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
key="ext_channel",
name="Extra Channel",
icon="mdi:export",
attribute=CurrentState.bit_state,
# attribute=CurrentState.bit_state,
command_on=CommandID.TURN_ON_EXT_CHANNEL,
command_off=CommandID.TURN_OFF_EXT_CHANNEL,
features=Features.EXT_CHANNEL,
Expand All @@ -118,6 +118,58 @@
},
assumed_state=True,
),
PandoraCASBooleanEntityDescription(
key="climate_glass_heating",
name="Climate Glass Heating",
icon="mdi:mirror",
attribute=CurrentState.can_climate_glass_heat,
command_on=CommandID.CLIMATE_GLASS_HEAT_TURN_ON,
command_off=CommandID.CLIMATE_GLASS_HEAT_TURN_OFF,
),
PandoraCASBooleanEntityDescription(
key="climate_steering_heating",
name="Climate Steering Heating",
icon="mdi:steering",
icon_off="mdi:steering-off",
attribute=CurrentState.can_climate_glass_heat,
command_on=CommandID.CLIMATE_STEERING_HEAT_TURN_ON,
command_off=CommandID.CLIMATE_STEERING_HEAT_TURN_OFF,
),
PandoraCASBooleanEntityDescription(
key="climate_air_conditioning",
name="Climate Air Conditioning",
icon="mdi:steering",
icon_off="mdi:steering-off",
attribute=CurrentState.can_climate_ac,
command_on=CommandID.CLIMATE_AC_TURN_ON,
command_off=CommandID.CLIMATE_AC_TURN_OFF,
),
PandoraCASBooleanEntityDescription(
key="climate_system",
name="Climate System",
icon="mdi:hvac",
icon_off="mdi:hvac-off",
attribute=CurrentState.can_climate_ac,
command_on=CommandID.CLIMATE_SYS_TURN_ON,
command_off=CommandID.CLIMATE_SYS_TURN_OFF,
),
PandoraCASBooleanEntityDescription(
key="climate_defroster",
name="Climate Defroster",
icon="mdi:defrost-front",
icon_off="mdi:windshield-outline",
attribute=CurrentState.can_climate_ac,
command_on=CommandID.CLIMATE_DEFROSTER_TURN_ON,
command_off=CommandID.CLIMATE_DEFROSTER_TURN_OFF,
),
PandoraCASBooleanEntityDescription(
key="climate_battery_heating",
name="Climate Battery Heating",
icon="mdi:car-battery",
attribute=CurrentState.can_climate_ac,
command_on=CommandID.CLIMATE_DEFROSTER_TURN_ON,
command_off=CommandID.CLIMATE_DEFROSTER_TURN_OFF,
),
]


Expand Down

0 comments on commit 02199ad

Please sign in to comment.