Skip to content

Commit 02199ad

Browse files
committed
feat: introduce climate entities
refactor: commented out redundant extra channel attribute setting chore: bump version number (v2024.3.1 -> v2024.3.2)
1 parent bb6be9a commit 02199ad

File tree

4 files changed

+70
-3
lines changed

4 files changed

+70
-3
lines changed

custom_components/pandora_cas/button.py

+12
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,18 @@ class PandoraCASButtonEntityDescription(
103103
entity_category=EntityCategory.DIAGNOSTIC,
104104
allow_simultaneous_presses=False,
105105
),
106+
PandoraCASButtonEntityDescription(
107+
key="climate_comfort",
108+
name="Climate Comfort",
109+
icon="mdi:palm-tree",
110+
command=CommandID.CLIMATE_MODE_COMFORT,
111+
),
112+
PandoraCASButtonEntityDescription(
113+
key="climate_interior_ventilation",
114+
name="Climate Interior Ventilation",
115+
icon="mdi:fan",
116+
command=CommandID.CLIMATE_MODE_VENT,
117+
),
106118
]
107119

108120

custom_components/pandora_cas/manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"issue_tracker": "https://github.com/alryaz/hass-pandora-cas/issues",
1313
"requirements": [
1414
"haversine~=2.8.0",
15-
"pandora-cas==0.0.2"
15+
"pandora-cas==0.0.3"
1616
],
17-
"version": "2024.3.1"
17+
"version": "2024.3.2"
1818
}

custom_components/pandora_cas/number.py

+3
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ class PandoraCASNumberEntityDescription(
5959
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
6060
device_class=NumberDeviceClass.TEMPERATURE,
6161
mode=NumberMode.SLIDER,
62+
entity_registry_enabled_default=False,
6263
),
6364
PandoraCASNumberEntityDescription(
6465
key="climate_seat_heating",
@@ -71,6 +72,7 @@ class PandoraCASNumberEntityDescription(
7172
native_max_value=0,
7273
native_step=1,
7374
mode=NumberMode.SLIDER,
75+
entity_registry_enabled_default=False,
7476
),
7577
PandoraCASNumberEntityDescription(
7678
key="climate_seat_ventilation",
@@ -83,6 +85,7 @@ class PandoraCASNumberEntityDescription(
8385
native_max_value=0,
8486
native_step=1,
8587
mode=NumberMode.SLIDER,
88+
entity_registry_enabled_default=False,
8689
),
8790
]
8891

custom_components/pandora_cas/switch.py

+53-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
key="ext_channel",
9797
name="Extra Channel",
9898
icon="mdi:export",
99-
attribute=CurrentState.bit_state,
99+
# attribute=CurrentState.bit_state,
100100
command_on=CommandID.TURN_ON_EXT_CHANNEL,
101101
command_off=CommandID.TURN_OFF_EXT_CHANNEL,
102102
features=Features.EXT_CHANNEL,
@@ -118,6 +118,58 @@
118118
},
119119
assumed_state=True,
120120
),
121+
PandoraCASBooleanEntityDescription(
122+
key="climate_glass_heating",
123+
name="Climate Glass Heating",
124+
icon="mdi:mirror",
125+
attribute=CurrentState.can_climate_glass_heat,
126+
command_on=CommandID.CLIMATE_GLASS_HEAT_TURN_ON,
127+
command_off=CommandID.CLIMATE_GLASS_HEAT_TURN_OFF,
128+
),
129+
PandoraCASBooleanEntityDescription(
130+
key="climate_steering_heating",
131+
name="Climate Steering Heating",
132+
icon="mdi:steering",
133+
icon_off="mdi:steering-off",
134+
attribute=CurrentState.can_climate_glass_heat,
135+
command_on=CommandID.CLIMATE_STEERING_HEAT_TURN_ON,
136+
command_off=CommandID.CLIMATE_STEERING_HEAT_TURN_OFF,
137+
),
138+
PandoraCASBooleanEntityDescription(
139+
key="climate_air_conditioning",
140+
name="Climate Air Conditioning",
141+
icon="mdi:steering",
142+
icon_off="mdi:steering-off",
143+
attribute=CurrentState.can_climate_ac,
144+
command_on=CommandID.CLIMATE_AC_TURN_ON,
145+
command_off=CommandID.CLIMATE_AC_TURN_OFF,
146+
),
147+
PandoraCASBooleanEntityDescription(
148+
key="climate_system",
149+
name="Climate System",
150+
icon="mdi:hvac",
151+
icon_off="mdi:hvac-off",
152+
attribute=CurrentState.can_climate_ac,
153+
command_on=CommandID.CLIMATE_SYS_TURN_ON,
154+
command_off=CommandID.CLIMATE_SYS_TURN_OFF,
155+
),
156+
PandoraCASBooleanEntityDescription(
157+
key="climate_defroster",
158+
name="Climate Defroster",
159+
icon="mdi:defrost-front",
160+
icon_off="mdi:windshield-outline",
161+
attribute=CurrentState.can_climate_ac,
162+
command_on=CommandID.CLIMATE_DEFROSTER_TURN_ON,
163+
command_off=CommandID.CLIMATE_DEFROSTER_TURN_OFF,
164+
),
165+
PandoraCASBooleanEntityDescription(
166+
key="climate_battery_heating",
167+
name="Climate Battery Heating",
168+
icon="mdi:car-battery",
169+
attribute=CurrentState.can_climate_ac,
170+
command_on=CommandID.CLIMATE_DEFROSTER_TURN_ON,
171+
command_off=CommandID.CLIMATE_DEFROSTER_TURN_OFF,
172+
),
121173
]
122174

123175

0 commit comments

Comments
 (0)