mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 03:37:07 +00:00
Fix wirelesstag switch arm/disarm (#59515)
This commit is contained in:
parent
34bc1298aa
commit
6bb816d226
@ -73,13 +73,13 @@ class WirelessTagPlatform:
|
||||
|
||||
def arm(self, switch):
|
||||
"""Arm entity sensor monitoring."""
|
||||
func_name = f"arm_{switch.sensor_type}"
|
||||
func_name = f"arm_{switch.entity_description.key}"
|
||||
if (arm_func := getattr(self.api, func_name)) is not None:
|
||||
arm_func(switch.tag_id, switch.tag_manager_mac)
|
||||
|
||||
def disarm(self, switch):
|
||||
"""Disarm entity sensor monitoring."""
|
||||
func_name = f"disarm_{switch.sensor_type}"
|
||||
func_name = f"disarm_{switch.entity_description.key}"
|
||||
if (disarm_func := getattr(self.api, func_name)) is not None:
|
||||
disarm_func(switch.tag_id, switch.tag_manager_mac)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user