-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Running the test function via HA fails for my XS01-WX:
File "/usr/src/homeassistant/homeassistant/components/button/__init__.py", line 132, in _async_press_action
await self.async_press()
File "/config/custom_components/xsense/button.py", line 111, in async_press
await self.entity_description.press_fn(device, xsense)
File "/config/custom_components/xsense/button.py", line 25, in run_action
return await xsense.action(entity, action)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/xsense/async_xsense.py", line 270, in action
await self.set_state(entity, action_def['shadow'], topic, action_def)
File "/usr/local/lib/python3.13/site-packages/xsense/async_xsense.py", line 241, in set_state
station = entity.station
^^^^^^^^^^^^^^
AttributeError: 'Station' object has no attribute 'station'
python-xsense/xsense/async_xsense.py
Lines 240 to 241 in 4fa8532
| async def set_state(self, entity: Entity, shadow: str, topic: str, definition: Dict): | |
| station = entity.station |
The Entity that is passed to the function is a Station, so we cannot use entity.station.
Metadata
Metadata
Assignees
Labels
No labels