Skip to content

Commit 7ddbd4a

Browse files
committed
just realized that attributes must always be a dictionary
1 parent 5d961d4 commit 7ddbd4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ham/things.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from abc import ABCMeta, abstractmethod
22
import json
3-
from typing import Union, TYPE_CHECKING, ClassVar, Any
3+
from typing import Union, TYPE_CHECKING, ClassVar
44

55
# LiteralString is from Python 3.11;
66
# atm, we want to support Python 3.9
@@ -74,7 +74,7 @@ def attributes(self):
7474
raise AttributeError("Attributes is write-only by design")
7575

7676
@attributes.setter
77-
def attributes(self, attributes: Any):
77+
def attributes(self, attributes: dict):
7878
"""Publish the JSON attributes of this entity."""
7979
self.publish_mqtt_message(bytes(json.dumps(attributes), "utf-8"), "attrs")
8080

0 commit comments

Comments
 (0)