Hi guys,
Is it possible to create an input_slider in bidirectional mode with IR codes? to control AC temperature or TV Volume?
Thanks
Hi guys,
Is it possible to create an input_slider in bidirectional mode with IR codes? to control AC temperature or TV Volume?
Thanks
The short answer is “probably”. It’s going to depend on how you send and receive IR, and it’ll require you to do some configuration to support it. Input_slider has methods to set or get values.
I have a broadlink IR so is it possible? can you give me a hint how to start? Thanks
I don’t have a broadlink, so I’m not sure how it is represented in HA.
You’ll want two automations. One that looks at the input_slider’s state as a trigger, then runs an automation that sends the appropriate Broadlink command.
The other will watch for a volume up or down (you can have multiple triggers) and use the HA service that changes input_slider.
First step would be to get your Broadlink set up so that you can send and receive commands into HA. Use the states dev tool and the services tool to test.
Hi,
I managed to send the IR but now how can i define if the slider is going up or down to send the right command?
Thanks
Automation.yaml
- alias: 'Sound System Volume Up'
hide_entity: True
trigger:
- platform: state
entity_id: input_slider.sound_system_vol
condition:
condition: state
entity_id: switch.sound_system_lr
state: 'on'
action:
- service: script.sound_system_vol_up
- alias: 'Sound System Volume Down'
hide_entity: True
trigger:
- platform: state
entity_id: input_slider.sound_system_vol
condition:
condition: state
entity_id: switch.sound_system_lr
state: 'on'
action:
- service: script.sound_system_vol_down
Scripts.yaml
sound_system_vol_up:
alias: Sound System Volume Up
sequence:
- service: broadlink.send_packet_10_0_0_102
data:
packet:
- 'JgCMAJaSFDYUNhQRFBEUERQQFDYUERQ2FDYUERQRFDYUERQ1FBEUNhQ2FBEUERQ2FDYUERQRFBEUEBQ2FDYUERQRFDYUNhQABeSWkhQ2FDYUERQRFBEUERQ1FBEUNhQ2FBEUERQ2FBEUNhQRFDUUNhQRFBEUNhQ2FBEUERQRFBEUNRQ2FBEUERQ2FDYUAA0FAAAAAAAAAAAAAAAA'
sound_system_vol_down:
alias: Sound System Volume Down
sequence:
- service: broadlink.send_packet_10_0_0_102
data:
packet:
- 'JgCMAJaTFDUVNRQRFBEUERQRFDYUERQ2FDYUERQRFDUUERQ2FBEUNhQ2FBEUNhQ1FDYUERQRFBEUERQ2FBEUERQRFDYUNRQABeSXkhQ2FDYUERQRFBAUERQ2FBEUNhQ2FBEUERQ1FRAUNhQRFDYUNhQRFDYUNhQ1FBEUERQRFBEUNhQRFBEUERQ2FDUVAA0FAAAAAAAAAAAAAAAA'
Input_slider.yaml
sound_system_vol:
name: 'Volume'
min: 1
max: 42
step: 1
initial: 20
So, with the Broadlink, you send Vol+ and Vol-.
Off the top of my head, I’d keep a second slider that you use as a reference. So when you trigger off your main slider changing, you’d compare to the reference, perform the appropriate number of vol+/vol-, then set the reference to the same value as the main.
To do that comparison, you’ll want to look at service_template - you can use a template to decide which service to run (script.sound_system_vol_down or script.sound_system_vol_up)
I’m not sure how you’d loop that, though, to perform it the right number of times.
You’re getting into the realm where AppDaemon may be helpful.
Dear,
did you get this working,
as i also wanted this to work on my HA,
but could not
Please guide if you have done it.