2 Commits

Author SHA1 Message Date
ryanbdclark
4b90ce0d61 Update CHANGELOG.md 2024-03-27 15:53:56 +00:00
RyanClark123
50c55dcfd3 Add binary sensor, correct interval input
### Feature
*Base station on added as binary sensor

### Fix
* Bumping pyowletapi to 2024.3.2
* UI config now allows you to set interval to 5 seconds, previously the minimum was 10
2024-03-27 15:51:12 +00:00
7 changed files with 26 additions and 5 deletions

View File

@@ -1,6 +1,14 @@
# Changelog
<!--next-version-placeholder-->
##2024.3.1
### Feature
* Base station on added as binary sensor ([`50c55dc`](https://github.com/ryanbdclark/owlet/commit/50c55dcfd30d15027155a8f1d05340238501522d))
### Fix
* Bumping pyowletapi to 2024.3.2 ([`50c55dc`](https://github.com/ryanbdclark/owlet/commit/50c55dcfd30d15027155a8f1d05340238501522d))
* UI config now allows you to set interval to 5 seconds, previously the minimum was 10 ([`50c55dc`](https://github.com/ryanbdclark/owlet/commit/50c55dcfd30d15027155a8f1d05340238501522d))
##2023.11.2 (2023-11-23)
### Feature
* Support added for V2 sock ([`50fe1a8`](https://github.com/ryanbdclark/owlet/commit/50fe1a87656b7d6413d06f06f3650fd0bfb48e02))

View File

@@ -83,6 +83,11 @@ SENSORS: tuple[OwletBinarySensorEntityDescription, ...] = (
translation_key="awake",
icon="mdi:sleep",
),
OwletBinarySensorEntityDescription(
key="base_station_on",
translation_key="base_on",
device_class=BinarySensorDeviceClass.POWER,
),
)
@@ -97,7 +102,6 @@ async def async_setup_entry(
sensors = []
for coordinator in coordinators:
print(coordinator.sock.properties)
for sensor in SENSORS:
if sensor.key in coordinator.sock.properties:
sensors.append(OwletBinarySensor(coordinator, sensor))

View File

@@ -165,7 +165,7 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
vol.Required(
CONF_SCAN_INTERVAL,
default=self.config_entry.options.get(CONF_SCAN_INTERVAL),
): vol.All(vol.Coerce(int), vol.Range(min=10)),
): vol.All(vol.Coerce(int), vol.Range(min=5)),
}
)

View File

@@ -9,7 +9,7 @@
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/ryanbdclark/owlet/issues",
"requirements": [
"pyowletapi==2023.11.4"
"pyowletapi==2024.3.2"
],
"version": "2023.11.2"
"version": "2024.3.1"
}

View File

@@ -74,6 +74,9 @@
},
"awake": {
"name": "Awake"
},
"base_on": {
"name": "Base station on"
}
},
"sensor": {

View File

@@ -74,6 +74,9 @@
},
"awake": {
"name": "Awake"
},
"base_on": {
"name": "Base station on"
}
},
"sensor": {

View File

@@ -74,6 +74,9 @@
},
"awake": {
"name": "Awake"
},
"base_on": {
"name": "Base station on"
}
},
"sensor": {