11 Commits

Author SHA1 Message Date
ryanbdclark
c693fefbf3 Update manifest.json 2023-07-03 14:38:17 +01:00
ryanbdclark
523ba949dd Bumping pyowlet api
Bumping pyowletapi version to 2023.07.01
2023-07-03 14:37:49 +01:00
RyanClark123
3c35d87fd2 Minor changes to description
Minor changes to description of entities made
2023-06-15 11:11:06 +01:00
ryanbdclark
6c2c531a19 Update manifest.json 2023-05-30 14:30:23 +01:00
ryanbdclark
f4e38ec521 Update manifest.json 2023-05-30 14:27:07 +01:00
ryanbdclark
ecb950da8a Create cron.yml 2023-05-30 14:23:23 +01:00
RyanClark123
a7d4276671 Merge branch 'main' of https://github.com/ryanbdclark/owlet 2023-05-30 13:57:30 +01:00
RyanClark123
ef0a3c3ddb Merge branch 'main' of https://github.com/ryanbdclark/owlet 2023-05-30 13:57:14 +01:00
ryanbdclark
7844b5bd87 Update CHANGELOG.md 2023-05-30 13:49:15 +01:00
RyanClark123
3d31de0205 Merge branch 'main' of https://github.com/ryanbdclark/owlet 2023-05-30 13:47:20 +01:00
RyanClark123
8d173174e2 Fixed binary sensors
### Fix
* Fixed issue with binary sensors not loading, caused by change to way the coordinators are stored
2023-05-30 13:46:48 +01:00
6 changed files with 37 additions and 9 deletions

21
.github/workflows/cron.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: Validate with hassfest
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
validate:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- name: HACS validation
uses: "hacs/action@main"
with:
category: "integration"
- name: Hassfest validation
uses: "home-assistant/actions/hassfest@master"

View File

@@ -1,6 +1,10 @@
# Changelog # Changelog
<!--next-version-placeholder--> <!--next-version-placeholder-->
## 2023.05.7 (2023-05-30)
### Fix
* Fixed issue with binary sensors not loading, caused by change to way the coordinators are stored ([`8d17317`](https://github.com/ryanbdclark/owlet/commit/8d173174e286b0451cbb2c0d4ae3087028d1ea23))
## 2023.05.6 (2023-05-30) ## 2023.05.6 (2023-05-30)
### Fix ### Fix
* In light of submitting this as a pull request to the core of HA there have been some refactoring changes to comply with HA's style requirements * In light of submitting this as a pull request to the core of HA there have been some refactoring changes to comply with HA's style requirements

View File

@@ -102,11 +102,13 @@ async def async_setup_entry(
) -> None: ) -> None:
"""Set up the owlet sensors from config entry.""" """Set up the owlet sensors from config entry."""
coordinator: OwletCoordinator = hass.data[DOMAIN][config_entry.entry_id] coordinators: OwletCoordinator = hass.data[DOMAIN][config_entry.entry_id].values()
entities = [OwletBinarySensor(coordinator, sensor) for sensor in SENSORS] async_add_entities(
OwletBinarySensor(coordinator, sensor)
async_add_entities(entities) for coordinator in coordinators
for sensor in SENSORS
)
class OwletBinarySensor(OwletBaseEntity, BinarySensorEntity): class OwletBinarySensor(OwletBaseEntity, BinarySensorEntity):
@@ -120,7 +122,7 @@ class OwletBinarySensor(OwletBaseEntity, BinarySensorEntity):
"""Initialize the binary sensor.""" """Initialize the binary sensor."""
super().__init__(coordinator) super().__init__(coordinator)
self.entity_description = sensor_description self.entity_description = sensor_description
self._attr_unique_id = f"{self.sock.serial}-{self.entity_description.name}" self._attr_unique_id = f"{self.sock.serial}-{self.entity_description.translation_key}"
@property @property
def is_on(self) -> bool: def is_on(self) -> bool:

View File

@@ -5,6 +5,7 @@
"config_flow": true, "config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/owlet", "documentation": "https://www.home-assistant.io/integrations/owlet",
"iot_class": "cloud_polling", "iot_class": "cloud_polling",
"requirements": ["pyowletapi==2023.5.30"], "issue_tracker": "https://github.com/ryanbdclark/owlet/issues",
"version":"2023.5.6" "requirements": ["pyowletapi==2023.07.01"],
"version":"2023.07.01"
} }

View File

@@ -65,7 +65,7 @@
"name": "Sock Diconnected Alert" "name": "Sock Diconnected Alert"
}, },
"sock_off":{ "sock_off":{
"name":"sock_off" "name":"Sock Off"
}, },
"awake":{ "awake":{
"name":"Awake" "name":"Awake"

View File

@@ -65,7 +65,7 @@
"name": "Sock Diconnected Alert" "name": "Sock Diconnected Alert"
}, },
"sock_off":{ "sock_off":{
"name":"sock_off" "name":"Sock Off"
}, },
"awake":{ "awake":{
"name":"Awake" "name":"Awake"