Skip to content

Commit

Permalink
Return the config attribute to the sensor #28
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Dec 7, 2024
1 parent d6e9ad1 commit 9c25ba6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/python_script/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ async def async_setup_platform(
class PythonSensor(Entity):
def __init__(self, code, config: dict):
self.code = code
self.config = config
self.attributes = {}

self._attr_device_class = config.get(CONF_DEVICE_CLASS)
Expand Down

0 comments on commit 9c25ba6

Please sign in to comment.