Skip to content

Commit

Permalink
Drop Climate entity
Browse files Browse the repository at this point in the history
  • Loading branch information
stickpin committed Mar 1, 2024
1 parent 6f91380 commit 1cd6c1c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 99 deletions.
3 changes: 1 addition & 2 deletions custom_components/volkswagencarnet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from volkswagencarnet.vw_connection import Connection
from volkswagencarnet.vw_dashboard import (
Instrument,
Climate,
BinarySensor,
Sensor,
Switch,
Expand Down Expand Up @@ -334,7 +333,7 @@ async def async_added_to_hass(self) -> None:
@property
def instrument(
self,
) -> Union[BinarySensor, Climate, DoorLock, Position, Sensor, Switch, TrunkLock, Number, Instrument]:
) -> Union[BinarySensor, DoorLock, Position, Sensor, Switch, TrunkLock, Number, Instrument]:
"""Return corresponding instrument."""
return self.data.instrument(self.vin, self.component, self.attribute)

Expand Down
96 changes: 0 additions & 96 deletions custom_components/volkswagencarnet/climate.py

This file was deleted.

1 change: 0 additions & 1 deletion custom_components/volkswagencarnet/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"lock": "lock",
"device_tracker": "device_tracker",
"switch": "switch",
"climate": "climate",
"number": "number",
}

Expand Down

2 comments on commit 1cd6c1c

@virtualdj
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity, why did you choose to drop the Climate entity? The question is not related to this integration but from a developer perspective.
Is that because the number entity is easier to handle?

@stickpin
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not able to find a proper trigger for the target_temperature change.
The problem is that the temp change and the AC on/off are two different APIs.
So I had to manage it in the async_write_ha_state which is ugly. :)
With the Number and the Switch it's much easier as they from the beginning two separate controls.

Please sign in to comment.