Skip to content

Commit dfadff2

Browse files
committed
feat(crestron/virtual_switcher): suppress errors calling power
quack like a physical device
1 parent 425dcc6 commit dfadff2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/crestron/virtual_switcher.cr

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ class Crestron::VirtualSwitcher < PlaceOS::Driver
4242
@audio = setting?(AudioSink, :audio_sink)
4343
end
4444

45+
# dummy to supress errors in routing
46+
def power(state : Bool)
47+
state
48+
end
49+
4550
protected def switch_audio_to(address : JSON::Any?)
4651
return unless address
4752
if sink = @audio

0 commit comments

Comments
 (0)