Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proper sensor and binary sensor entities #39

Merged
merged 38 commits into from
Dec 19, 2024
Merged

Add proper sensor and binary sensor entities #39

merged 38 commits into from
Dec 19, 2024

Conversation

wtadler
Copy link
Collaborator

@wtadler wtadler commented Dec 19, 2024

So far, this integration has exposed one device_tracker entity, with attributes for the sensor data that LeafSpy provides. This PR instead provides that sensor data as proper entities.

Chaoscontrol and others added 30 commits December 2, 2024 08:24
Add proper sensors and binary_sensors to represent information previously stored as attributes in the device_tracker. Some outstanding issues still, so this is a work in progress.
… state (#35)

* Making the binary_sensor initialise and recover state after HA restart
* Sensors to automatically initialise and restore state after HA restart
mimicking implementation in sensor.py
addresses problem of unnecessary unit conversion when sensors restore values upon restart
* Add device name "Leaf"
* Added car icon for device_tracker entity
(not sure about this one)
@wtadler wtadler linked an issue Dec 19, 2024 that may be closed by this pull request
# Conflicts:
#	custom_components/leafspy/strings.json
#	custom_components/leafspy/translations/en.json
@wtadler wtadler marked this pull request as draft December 19, 2024 04:04
@wtadler wtadler marked this pull request as ready for review December 19, 2024 13:33
@wtadler wtadler marked this pull request as draft December 19, 2024 17:52
@wtadler wtadler merged commit 9fd64fd into main Dec 19, 2024
2 checks passed
@wtadler wtadler linked an issue Dec 19, 2024 that may be closed by this pull request
@wtadler wtadler deleted the sensor_entities branch December 19, 2024 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Entities not being restored upon restart Power switch binary_sensor not turning "On"
2 participants