This integration is brilliant. I suggest checking it out.
The docs there are a little sparse on what is necessary to create entities from existing device codes.
And it doesn’t look like it supports switch entities?
All of my broadlink entities are configured as switches and I have an existing code for each.
TBH, I’m still trying to figure out if this is even going to be an issue. the docs seem to indicate that what I have now should still work.
So SmartIR basically gives you a way to combine multiple ‘switch’ entities into a ‘controller’ I guess you could say, which becomes a Media Player, Climate or Fan entity.
eg:
Instead of having a ‘switch’ entity for each button of a physical remote control for a HiFi system that you learn the codes from, you then create a Media Player entity and all the ‘switch’ codes become associated with the Media Player. I have learnt a bunch of codes from my old (non-smart) Onkyo surround sound receiver and added them to a file which SmartIR uses to create a Media Player. In HA that Media Player entity is now the equivalent of a smart Onkyo receiver. I can use volume up/down, select input source etc. and SmartIR will send the required codes to the Broadlink IR blaster. Using a smart power plug with power monitoring I get feedback to HA (and into SmartIR) as to whether or not the amp is on or off.
Personally, I think it is crazy even I’ve already seen the warning message about the broadlink component shows will not support the Yaml configuration a long time ago, and I found after I installed the updates of HA yesterday it broke all my broadlink switches and no solution about the switches.
I use Google Speak (Nest, Home, TV) to control all these devices with on and off and now it made me confused about how could I solve this problem.
And again, personally, I won’t remove the configuration in Yaml which just like the Modbus component there are a lot of things customized.
The only solution is trying to copy and paste the old broadlink component to the customized folder I think, and I will try it later.
Unfortunately neither . As far as I can tell, this doesn’t create any entities. It’s just a library of remote commands in the background you can run using remote.send_command service calls. But you need to check that ‘library’ for the exact name, if you can’t remember, in order to run a specific command.
@sparkydave I agree with @finity, that the docs are sparse.
Is it limited to fans, media players and climate, or are those just most commonly used?
So I think my solution will be to make template switches (since I have quite a lot of lights and sockets running 433mhz stateless RF, and a lot of IR stuff) in order to get a state after calling a remote command.
For example:
I often combined RF and IR for a device, like the socket for my speakers and then the actual power button for them. Stuff I can’t really pack into a media player, because a universal media player doesn’t support several ‘power stages’.
Neither does it support individual channel volumes like rear, center, bass. But that’s just a general HA wish of mine .
This whole breaking change really adds a layer of complexity to my config, which I wasn’t hoping for. If anyone has a better solution, feel free to stop me .
EDIT:
@finity 2022.2: Let's start streamlining! - #881 by finity
Took a snapshot and updating right now, just to confirm what I saw.
Results in my next post.
It is at the moment but the dev has been really good in the past, perhaps a feature request to expand the component would be taken up.
So my errors included
Kitchen lights is the first switch in my Broadlink YAML list.
So I looked at the docs for Broadlink and saw the syntax is slightly different from what I had.
Added that sample Philips TV switch, just to show the difference.
As soon as this was changed to reflect the sample syntax, it accepted my config for kitchen lights.
Which means I just had an old config syntax, which is now no longer valid. As soon as you edit the config to reflect the docs, then the YAML config works again. Hurrah.
So just to quote myself from post 4: “Maybe my YAML isn’t in a format it can be converted from?”
Seems I was close .
Some very good suggestions were already made, but wanted to add another angle: I’ve had a Broadlink RM for quite a while and learned all the codes initially and haven’t touched it since (also, the learn function at that point in time in the integration was broken so I had to learn/capture codes outside of HA). I made a script for every button press which works by sending the hex codes in scripts. This avoids having it all stored in the JSON files, so if you’re someone that for some reason wants it more easily and safely editable, this is another way. Not as nice as the HACS integration that creates devices.
I didn’t get it why you still trying to use the configuration that the component has already removed the YAML configuration and the document page is outdated.
To be honest, this update of the broadlink component is like a real SHIT which it makes no sense to remove the supports of the YAML configurations.
@Benjamin_De_Smet please not mark your response as the solution as you are misleading all other ppl with mass confusion. You haven’t solved your problem yet and just mark your post as the solution?
I have solved my problem, because if I change the syntax like I did in my last post (as the docs state I should), then my YAML config works for Broadlink.
Sure, I didn’t figure out the automatic import of switches into UI yet, but that’s something else…
If you want, I can update here as soon as I get around to fixing my YAML Syntax so the switches get imported (if I understand correctly) and then update to the current release.
(I reverted my snapshot, because I didn’t have time now to fix all of it)
Yup. Pain in the …
ah, sorry, as it is similar to the original, I got errors, it also needs to remove the friend name of the entity. Problem solved. As I thought the Broadlink component will ignore all YAML settings but fortunately, no big changes.
My mistake.
Great to hear your problem is solved!
I’ll still post an update after I’ve fixed my config, just in case it helps someone sitting in the same boat =).
So, updated after changing the YAML format, which I’m guessing is the deprecated format the breaking changes release notes mentioned.
The previously deprecated YAML configuration of the Broadlink integration has been removed.
After the changes and the update, everything is peachy. Good times!
I also now have the remote.send_command file for everything. Who knows - might come in handy someday.
However, some confusion on my part, because of @finity
the documentation/breaking changes section is pretty misleading if nothing actually gets imported but also everything gets wiped out.
and from the release notes
Broadlink is now configured via the UI, any existing YAML configuration has been imported in previous releases and can now be safely removed from your YAML configuration files.
So I don’t know what this is supposed to mean. What got imported? What was supposed to get imported?
I can’t see any automatically created entities or anything under the Broadlink integration (which I also don’t believe is meant by that…)
Can someone shed light on that part?
The integration configuration is the only thing that got imported, no custom switches that are configured via yaml as they are still done via yaml as in the documentation.
The only thing that got created automatically for me is the temp sensor and teh remote on the broadlink rm pro device
That got imported a long time back and has been working fine for me too.
I got nervous when this was reported:
but apparently my concern was misguided. Which I kind of thought already but it’s good to have that confirmation. (got bit by this twice already now. I need to hold back a bit until confirmation either way… But I guess I thought I was doing that already as well since the release was already a week ago now… )
thanks!
The only thing that needed modifying was the custom switches i had to be based on new yaml configuration as per docs but was a 5/10 minute job at max