Closed kukki closed 6 years ago
HA 0.63.3 supports the device. The custom component isn't needed anymore:
xiaomi_miio can only use the IR as script command. What I want is a switch. Is there any way to use it as switch with xiaomi_miio?
Hmm... good question. :-) I don't know if I'm honest.
Let's fix this component! ;-)
Please enable the debug output of this component
logger:
default: warn
logs:
custom_components.switch.chuangmi_ir: debug
And provide your home-assistant.log. Does it show something about the missing switch?
There is no error or warning about missing switch. There is only one INFO line for custom_components in log:
2018-02-23 16:11:31 INFO (Thread-2) [custom_components.switch.chuangmi_ir] Initializing with host 192.168.1.161 (token 34784...)
It was odd.
At the meantime, I add name
attribute to the chuangmi_ir sub-switch. And it appears in the lists mentioned above. So current workaround for me is to just add the name attribute like this:
- platform: chuangmi_ir
host: !secret chuangmi_ip
name: "Xiaomi IR"
token: !secret chuangmi_key
switches:
tv:
name: 'TV Power'
command_on: 'Z6XHAKYBAAAqBQAAnAYAAJsNAAC2Dxxxxxxxxxxxxxxxxx'
command_off: 'Z6XHAKYBAAAqBQAAnAYAAJsNAAC2Dxxxxxxxxxxxxxxxxx'
It appears as switch.tv_power
This is strange. The default name of a switch should be "chuang_mi_ir_switch".
https://github.com/syssi/chuangmi_ir/blob/master/custom_components/switch/chuangmi_ir.py#L28-L43
chuangmi_ir.py commit version: c813877 hass version: 0.63.3
Switch.yaml:
Issue:
Observed: