Skip to content

Commit d0d3da0

Browse files
Merge pull request #74 from AnotherDaniel/ha_discoverable_changes
ha_mqtt_discoverable DeviceInfo import fix
2 parents f02d452 + 945d347 commit d0d3da0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

plugins/sinks/ha_mqtt/ha_mqtt.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import time
33
import logging
44
import ha_mqtt_discoverable
5-
from ha_mqtt_discoverable import Settings
6-
from ha_mqtt_discoverable.sensors import SensorInfo, Sensor, DeviceInfo
5+
from ha_mqtt_discoverable import Settings, DeviceInfo
6+
from ha_mqtt_discoverable.sensors import SensorInfo, Sensor
77
from utils.smasensors import get_sensor_dict
88
from utils.smahelpers import status_string
99
from typing import Dict, Any, Optional, List
@@ -136,7 +136,8 @@ def get_sensor(name: str, device_info: DeviceInfo) -> Optional[Sensor]:
136136
device_class=result.get('device_class'),
137137
state_class=result.get('state_class'),
138138
entity_category=result.get('entity_category'),
139-
suggested_display_precision=result.get('suggested_display_precision'),
139+
suggested_display_precision=result.get(
140+
'suggested_display_precision'),
140141
icon=result.get('icon'),
141142
device=device_info)
142143
# mqtt_settings is guarded above, so cast is safe for the type checker

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ requires = ["flit_core >=3.8.0,<4"]
44

55
[project]
66
name = "smahub"
7-
version = "1.7.5"
7+
version = "1.7.6"
88
authors = [{ name = "Daniel Krippner", email = "dk.mailbox@gmx.net" }]
99
description = "Little daemon that runs plugins for collecting data from SMA PV products, and publishes to eg MQTT via other plugins."
1010
readme = "README.md"
@@ -18,7 +18,7 @@ classifiers = [
1818
]
1919
dependencies = [
2020
"debugpy ~=1.8",
21-
"ha_mqtt_discoverable ~=0.16",
21+
"ha_mqtt_discoverable ~=0.24",
2222
"paho-mqtt ~=2.1",
2323
"requests ~=2.32",
2424
"urllib3 ~=2.2",

0 commit comments

Comments
 (0)