mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Add command to SmartThings button unique id (#141281)
* Add command to SmartThings button unique id * Add command to SmartThings button unique id
This commit is contained in:
parent
b3e3d77d7c
commit
06382f33e0
@ -63,9 +63,7 @@ class SmartThingsButtonEntity(SmartThingsEntity, ButtonEntity):
|
|||||||
"""Initialize the instance."""
|
"""Initialize the instance."""
|
||||||
super().__init__(client, device, set())
|
super().__init__(client, device, set())
|
||||||
self.entity_description = entity_description
|
self.entity_description = entity_description
|
||||||
self._attr_unique_id = (
|
self._attr_unique_id = f"{device.device.device_id}_{MAIN}_{entity_description.key}_{entity_description.command}"
|
||||||
f"{device.device.device_id}_{MAIN}_{entity_description.key}"
|
|
||||||
)
|
|
||||||
|
|
||||||
async def async_press(self) -> None:
|
async def async_press(self) -> None:
|
||||||
"""Press the button."""
|
"""Press the button."""
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
'previous_unique_id': None,
|
'previous_unique_id': None,
|
||||||
'supported_features': 0,
|
'supported_features': 0,
|
||||||
'translation_key': 'stop',
|
'translation_key': 'stop',
|
||||||
'unique_id': '2bad3237-4886-e699-1b90-4a51a3d55c8a_main_ovenOperatingState',
|
'unique_id': '2bad3237-4886-e699-1b90-4a51a3d55c8a_main_ovenOperatingState_stop',
|
||||||
'unit_of_measurement': None,
|
'unit_of_measurement': None,
|
||||||
})
|
})
|
||||||
# ---
|
# ---
|
||||||
@ -76,7 +76,7 @@
|
|||||||
'previous_unique_id': None,
|
'previous_unique_id': None,
|
||||||
'supported_features': 0,
|
'supported_features': 0,
|
||||||
'translation_key': 'stop',
|
'translation_key': 'stop',
|
||||||
'unique_id': '9447959a-0dfa-6b27-d40d-650da525c53f_main_ovenOperatingState',
|
'unique_id': '9447959a-0dfa-6b27-d40d-650da525c53f_main_ovenOperatingState_stop',
|
||||||
'unit_of_measurement': None,
|
'unit_of_measurement': None,
|
||||||
})
|
})
|
||||||
# ---
|
# ---
|
||||||
@ -123,7 +123,7 @@
|
|||||||
'previous_unique_id': None,
|
'previous_unique_id': None,
|
||||||
'supported_features': 0,
|
'supported_features': 0,
|
||||||
'translation_key': 'stop',
|
'translation_key': 'stop',
|
||||||
'unique_id': '2c3cbaa0-1899-5ddc-7b58-9d657bd48f18_main_ovenOperatingState',
|
'unique_id': '2c3cbaa0-1899-5ddc-7b58-9d657bd48f18_main_ovenOperatingState_stop',
|
||||||
'unit_of_measurement': None,
|
'unit_of_measurement': None,
|
||||||
})
|
})
|
||||||
# ---
|
# ---
|
||||||
|
Loading…
x
Reference in New Issue
Block a user