먼저 공유기에 smalltv ultra에 고정 ip를 부여.
예를 들면 openwrt에선 네트워크/dhcp and dns/정적임대에 smalltv ultra의 맥어드레스와 원하는 ip로 등록. 기존 임대된 ip는 제거하고 smalltv ultra 재부팅하면 부여된 ip로 등록됨.
해당 ip로 접속해 설정창의 버튼들을 HA의 rest_command에 등록해 자동화와 dashboard의 버튼으로 등록.
rest_command.yaml
smalltv_color_day:url: "http://192.168.1.90/set?hc=%2300FFFF&mc=%23EE82EE&sc=%23FF5900"smalltv_color_night:url: "http://192.168.1.90/set?hc=%23900090&mc=%23EE82EE&sc=%23FF5900"
smalltv_theme1:url: "http://192.168.1.90/set?theme=1"smalltv_theme2:url: "http://192.168.1.90/set?theme=2"smalltv_theme3:url: "http://192.168.1.90/set?theme=3"smalltv_theme4:url: "http://192.168.1.90/set?theme=4"smalltv_theme5:url: "http://192.168.1.90/set?theme=5"smalltv_theme6:url: "http://192.168.1.90/set?theme=6"smalltv_theme7:url: "http://192.168.1.90/set?theme=7"smalltv_brightness_10:url: "http://192.168.1.90/set?brt=10"smalltv_brightness_20:url: "http://192.168.1.90/set?brt=20"smalltv_brightness_50:url: "http://192.168.1.90/set?brt=50"smalltv_brightness_100:url: "http://192.168.1.90/set?brt=100"smalltv_reboot:url: "http://192.168.1.90/set?reboot=1"
automations.yaml
- id: 시간-일출alias: 시간-일출triggers:- trigger: sunevent: sunriseoffset: '00:15:00'actions:- action: light.turn_offentity_id:- light.geosildeung5- light.bedroom_mood- light.bedroom_mood2- action: frontend.set_themedata:name: plate-light- action: rest_command.smalltv_color_day