set up other moes pad

This commit is contained in:
John Lancaster
2025-12-09 01:09:56 -06:00
parent 3ae7c2b8e9
commit 3a8a0e48d0
2 changed files with 11 additions and 1 deletions

View File

@@ -2,6 +2,10 @@ moes_driver:
module: moes_pad
class: MoesBridge
moes1:
module: moes_pad
class: MoesPad
moes2:
module: moes_pad
class: MoesPad

View File

@@ -49,6 +49,8 @@ class MoesBridge(ADBase):
class MoesPad(ADBase):
"""Specfic implementation of a Moes Pad."""
def initialize(self):
self.adapi = self.get_ad_api()
self.log = self.adapi.log
@@ -70,4 +72,8 @@ class MoesPad(ADBase):
case MoesButtons.TOP_RIGHT:
self.adapi.call_service('light/toggle', entity_id='light.bedroom_john')
case MoesButtons.BOTTOM_LEFT:
self.adapi.call_service('light/toggle', entity_id='light.h6076_2')
self.adapi.call_service('light/toggle', entity_id='light.bedroom_stick')
case MoesButtons.BOTTOM_RIGHT:
for e in ('bedroom_stick', 'bedroom_john', 'bedroom_sydney'):
if self.adapi.get_state(e) == 'on':
self.adapi.call_service('light/toggle', entity_id=e)