Cześć i czołem, mam taki problem… Zakupiłem uniwersalny pilot IR UFO-R11. Bez problemu odczytuje kod, który nawet działa wysłany poprzez zigbee2MQTT… Ale mam mega problem, jak z tego kodu zrobić przycisk w Home Assistant, abym mógł zrobić np. włącz ledy, wyłącz ledy. Klimatyzacja chyba niestety nie działa (włączanie)…
Z góry dziękuję za podpowiedź…
artpc
(artur)
19 Kwiecień 2025 01:51
2
Tak wysyłam kody do broadlink_remote
Kod karty:
type: horizontal-stack
cards:
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: remote.send_command
service_data:
command: >-
b64:JgBQAAABJZMTExITEzYTEhIUEhMTEhI3EhMSFBI3ExITNxM2EjcTExM2EjcTNxQ1EzcTNhI4EjcTEhITEhQSExITEhMSExITEgAFYgABJkoSAA0FAAAAAAAA
device: remote.broadlink_remote
target:
entity_id:
- remote.broadlink_remote
device_id: a136f4d6d2e0d9a03e9351de815f89a1
entity: remote.broadlink_remote
name: Sound Bar ON
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: remote.send_command
service_data:
command: >-
b64:JgBYAAABJpITExMSExISExMSEhMTExM2EhMTEhMTEhMSOBI3EjcTEhMTExISExI3EhQSExM2EzYTNxM2EjgTEhM2EzcTEhITEgAFqQABKEkTAAxKAAEnShMADQU=
device: remote.broadlink_remote
target:
entity_id:
- remote.broadlink_remote
device_id: a136f4d6d2e0d9a03e9351de815f89a1
entity: remote.broadlink_remote
name: Sound Bar ON
icon: mdi:volume-minus
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: remote.send_command
service_data:
command: >-
b64:JgBYAAABJJQTEhITExMSExITEhMSExI4EhMSExITEhMSOBI3EjgSExI3EjgTNhITEhMTExI3EjcSFBITExISNxI4EjcTEhQSEgAFqQABJksTAAxJAAEmSxIADQU=
device: remote.broadlink_remote
target:
entity_id:
- remote.broadlink_remote
device_id: a136f4d6d2e0d9a03e9351de815f89a1
entity: remote.broadlink_remote
name: Sound Bar ON
icon: mdi:volume-plus
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: remote.send_command
service_data:
command: >-
b64:JgBQAAABJZQTEhITEhQTEhMSEhMSExI4ExISExITExITNxI3EjgSExITExIWNBM2ExITNxM2EzYUNhM2ExMTEhM2EhMUEhITEgAFqQABJ0oSAA0F
device: remote.broadlink_remote
target:
entity_id:
- remote.broadlink_remote
device_id: a136f4d6d2e0d9a03e9351de815f89a1
entity: remote.broadlink_remote
name: Sound Bass
- type: vertical-stack
cards:
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: remote.send_command
service_data:
command: >-
b64:JgBIAAABKJEUERUQFREUERQRFBEUERQ2FBEUERQRFBEVNRQ1FDYUERQRFDUVEBU1FDUVNRQRFDUVNRQRFDUVEBURFBEUNRUQFQANBQ==
device: remote.broadlink_remote
target:
entity_id:
- remote.broadlink_remote
device_id: a136f4d6d2e0d9a03e9351de815f89a1
entity: remote.broadlink_remote
name: Sound Bar Bluetooth
- type: vertical-stack
cards:
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: remote.send_command
service_data:
command: >-
b64:JgBQAAABJZQTEhITEhMSExMTEhMSExI3ExITExITEhMSNxM3EjcSExQ2EhMSExITExMSExI3EjgTEhI3EjgSNxM3EjcTEhITEgAFqgABJksSAA0F
device: remote.broadlink_remote
target:
entity_id:
- remote.broadlink_remote
device_id: a136f4d6d2e0d9a03e9351de815f89a1
entity: remote.broadlink_remote
name: Sound Bar Mute
action: call-service
wciąż działa ale warto już dostosować do nowego formatu action: remote.send_command
Tworzysz sobie pomocnika typu przycisk, a następnie podpinasz pod niego akcję ‘MQTT: Publish’. Jako topic ustawiasz topic do urządzenia (np. zigbee2mqtt/Pilot 1/set ), a payload ma postać:
{“ir_code_to_send”: “BXojoBE9AkABAaEGgAPgBwHAF0AHQAHgAwfAC8ABwA/AB8ABQA9AA0AB4AMHQAsLoQY9AnKbeiO+CD0C”}
Kodem do wysłania jest to co odczytałeś z urządzenia gdy jest w trybie uczenia i odczytało kod z oryginalnego pilota.
1 polubienie