From f1692ca9e46e342cf8927ea2f9cdbbbe19dde44a Mon Sep 17 00:00:00 2001 From: Gabriel Wieskamp Date: Tue, 12 Sep 2023 10:26:01 -0500 Subject: [PATCH] Expanded Sensors --- custom_components/mill/const.py | 32 +++++++++++++++++----------- custom_components/mill/manifest.json | 2 +- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/custom_components/mill/const.py b/custom_components/mill/const.py index 1ace0d3..85d2b9b 100644 --- a/custom_components/mill/const.py +++ b/custom_components/mill/const.py @@ -19,29 +19,37 @@ Platform.BINARY_SENSOR ] SENSORS: dict[str, SensorEntityDescription] = { - "Status": SensorEntityDescription( - name="Status", + "mib": SensorEntityDescription( + name="Mass In Bucket", icon="mdi:list-status", - key="data.attributes.status"), - "Bucket": SensorEntityDescription( - name="Bucket", + key="data.attributes.massInBucket"), + "masbe": SensorEntityDescription( + name="Mass Added Since Bucket Empty", + icon="mdi:pail-plus", + key="data.attributes.massAddedSinceBucketEmpty"), + "bf": SensorEntityDescription( + name="Bucket Fullness", icon="mdi:delete-variant", key="data.attributes.bucketFullness"), - "Cycle": SensorEntityDescription( + "cr": SensorEntityDescription( name="Cycle", icon="mdi:dots-horizontal-circle", key="data.attributes.dgoCycle.reported") } BINARY_SENSORS = { - "Locked": BinarySensorEntityDescription( - name="Locked", + "ll": BinarySensorEntityDescription( + name="Lid Locked", icon="mdi:lock", - key="data.attributes.isLocked"), - "Bucket Missing": BinarySensorEntityDescription( + key="data.attributes.lidLockState"), + "lo": BinarySensorEntityDescription( + name="Lid Open", + icon="mdi:delete-empty", + key="data.attributes.lidOpenState"), + "bm": BinarySensorEntityDescription( name="Bucket Missing", - icon="mdi:delete-variant", + icon="mdi:pail-off", key="data.attributes.bucketMissing"), - "Child Lock": BinarySensorEntityDescription( + "cl": BinarySensorEntityDescription( name="Child Lock", icon="mdi:lock", key="data.attributes.childLockEnabled.reported") diff --git a/custom_components/mill/manifest.json b/custom_components/mill/manifest.json index 9839f7d..62315fa 100644 --- a/custom_components/mill/manifest.json +++ b/custom_components/mill/manifest.json @@ -8,7 +8,7 @@ "issue_tracker": "https://github.com/theOrakle/mill/issues", "loggers": ["custom_components.mill"], "requirements": ["pydash"], - "version": "0.0.3", + "version": "0.0.4", "dependencies": [], "codeowners": ["@theOrakle"] }