2023-07-08 07:34:30 +01:00
|
|
|
from .iremote import IRemote
|
|
|
|
|
|
|
|
|
|
|
|
class MacroButton(IRemote):
|
|
|
|
"""A placeholder class in case this interface is being used interchangeably with the Remote API"""
|
|
|
|
|
|
|
|
def __str__(self):
|
2025-01-17 02:51:17 +00:00
|
|
|
return f'{type(self).__name__}{self._remote.kind}{self.index}'
|
2023-07-08 07:34:30 +01:00
|
|
|
|
|
|
|
@property
|
|
|
|
def identifier(self):
|
2025-01-17 02:51:17 +00:00
|
|
|
return f'command.button[{self.index}]'
|
2023-07-08 07:34:30 +01:00
|
|
|
|
|
|
|
@property
|
|
|
|
def state(self) -> bool:
|
2025-01-17 02:51:17 +00:00
|
|
|
self.logger.warning('button.state commands are not supported over VBAN')
|
2023-07-08 07:34:30 +01:00
|
|
|
|
|
|
|
@state.setter
|
|
|
|
def state(self, _):
|
2025-01-17 02:51:17 +00:00
|
|
|
self.logger.warning('button.state commands are not supported over VBAN')
|
2023-07-08 07:34:30 +01:00
|
|
|
|
|
|
|
@property
|
|
|
|
def stateonly(self) -> bool:
|
2025-01-17 02:51:17 +00:00
|
|
|
self.logger.warning('button.stateonly commands are not supported over VBAN')
|
2023-07-08 07:34:30 +01:00
|
|
|
|
|
|
|
@stateonly.setter
|
|
|
|
def stateonly(self, v):
|
2025-01-17 02:51:17 +00:00
|
|
|
self.logger.warning('button.stateonly commands are not supported over VBAN')
|
2023-07-08 07:34:30 +01:00
|
|
|
|
|
|
|
@property
|
|
|
|
def trigger(self) -> bool:
|
2025-01-17 02:51:17 +00:00
|
|
|
self.logger.warning('button.trigger commands are not supported over VBAN')
|
2023-07-08 07:34:30 +01:00
|
|
|
|
|
|
|
@trigger.setter
|
|
|
|
def trigger(self, _):
|
2025-01-17 02:51:17 +00:00
|
|
|
self.logger.warning('button.trigger commands are not supported over VBAN')
|