Use "next_state" attr instead of "post_pending" for ArmDisarm trait (#37325)

pull/37669/head
Rami Mosleh 2020-07-09 02:38:42 +03:00 committed by GitHub
parent a077c280c8
commit 62477a3457
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1073,8 +1073,8 @@ class ArmDisArmTrait(_Trait):
def query_attributes(self):
"""Return ArmDisarm query attributes."""
if "post_pending_state" in self.state.attributes:
armed_state = self.state.attributes["post_pending_state"]
if "next_state" in self.state.attributes:
armed_state = self.state.attributes["next_state"]
else:
armed_state = self.state.state
response = {"isArmed": armed_state in self.state_to_service}