Skip to content

Commit

Permalink
Add active rules sensor
Browse files Browse the repository at this point in the history
Fix #203
  • Loading branch information
kamaradclimber committed May 17, 2024
1 parent 81af13d commit 98d7702
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions custom_components/aquarea/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1706,6 +1706,15 @@ def build_sensors(mqtt_prefix: str) -> list[HeishaMonSensorEntityDescription]:
entity_category=EntityCategory.DIAGNOSTIC,
state_class=SensorStateClass.TOTAL_INCREASING,
),
HeishaMonSensorEntityDescription(
heishamon_topic_id="STAT1-active-rules",
key=f"{mqtt_prefix}stats",
name="HeishaMon Active rules",
state=partial(read_stats_json, "rules active"),
device=DeviceType.HEISHAMON,
entity_category=EntityCategory.DIAGNOSTIC,
state_class=SensorStateClass.MEASUREMENT,
),
HeishaMonSensorEntityDescription(
heishamon_topic_id="INFO_ip",
key=f"{mqtt_prefix}ip",
Expand Down

0 comments on commit 98d7702

Please sign in to comment.