我是搬运工之代发lidicn大神的小米盒子接入hasss插件 https://bbs.hassbian.com/thread-1075-1-1.html (出处: 『瀚思彼岸』» 智能家居第一站)
按照上贴,可以用 : 做成图形界面遥控器,成功接入小米盒子4,使用起来很顺畅啊。
可是,关机按键有效,能关机,开机按键无效,不能开机。好像插件有问题,大大能否把开机键弄好呀:开机按键isalive代码好像有问题,可能是开机键失效的原因。
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
vol.Required(CONF_NAME): cv.string,
vol.Required(CONF_HOST): cv.string,
})
_Log=logging.getLogger(__name__)
COMMANDS = {
'isalive':'/request?action=isalive',
'power':'/controller?action=keyevent&keycode=power',
'enter':'/controller?action=keyevent&keycode=enter',
'back':'/controller?action=keyevent&keycode=back',
'home':'/controller?action=keyevent&keycode=home',
'menu':'/controller?action=keyevent&keycode=menu',
'right':'/controller?action=keyevent&keycode=right',
'left':'/controller?action=keyevent&keycode=left',
'up':'/controller?action=keyevent&keycode=up',
'down':'/controller?action=keyevent&keycode=down',
'volumedown':'/controller?action=keyevent&keycode=volumedown',
'volumeup':'/controller?action=keyevent&keycode=volumeup',
|