-
-
Notifications
You must be signed in to change notification settings - Fork 36.4k
Add Tibber binary sensors #160365
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
base: dev
Are you sure you want to change the base?
Add Tibber binary sensors #160365
Conversation
Signed-off-by: Daniel Hjelseth Høyer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds binary sensor support to the Tibber integration for monitoring EV charger status through the Tibber Data API. The implementation follows the existing sensor platform pattern and adds three binary sensors: connector status (plug), charging status (battery charging), and device status (power).
Key Changes
- New binary sensor platform with three sensors for Tibber Data API devices
- Translation strings for the new binary sensor entities
- Removal of unnecessary debug logging from sensor platform
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
homeassistant/components/tibber/__init__.py |
Adds Platform.BINARY_SENSOR to the PLATFORMS list |
homeassistant/components/tibber/binary_sensor.py |
New file implementing binary sensors for connector, charging, and device status using the Data API coordinator |
homeassistant/components/tibber/strings.json |
Adds translation entries for the three new binary sensors |
homeassistant/components/tibber/sensor.py |
Removes debug log statement when sensor is not found in mapping (minor cleanup) |
| BinarySensorEntityDescription( | ||
| key="connector.status", | ||
| translation_key="connector_status", | ||
| device_class=BinarySensorDeviceClass.PLUG, | ||
| ), | ||
| BinarySensorEntityDescription( | ||
| key="charging.status", | ||
| translation_key="charging_status", | ||
| device_class=BinarySensorDeviceClass.BATTERY_CHARGING, | ||
| ), | ||
| BinarySensorEntityDescription( | ||
| key="onOff", | ||
| translation_key="device_status", | ||
| device_class=BinarySensorDeviceClass.POWER, | ||
| ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For what kind of device is this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heaters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heaters on batteries?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, regular indoor heaters (For example a heatpump).
The devices provide by the API will show information about EV chargers, EVs, home batteries and heaters
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Signed-off-by: Daniel Hjelseth Høyer <[email protected]>
Signed-off-by: Daniel Hjelseth Høyer <[email protected]>
Breaking change
Proposed change
Add Tibber binary sensors
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: