I’m quite new to home assistant and still learning.
I am trying to get my harmony activities into the UI with switches and also so that I then can start the ps4 or other devices with the activities and integratet this all into homekit. Read this post and did everything accordingly but somehow the switch entities just won’t show up.
That’s bizarre !
I just checked my old configs for reference and they don’t include extra spaces, and for reference, neither do the examples given in the docs linked above.
Can’t argue with what works though !!
Also, that being the issue, it SHOULD have failed when Config was tested and pointed to the error.
Yes they don’t write it in the documentation.
That’s what I thought but the config test said everything is fine.
Maybe a bug. I’m running Version 0.99.2
I just tried the switches but they are not working
So if I turn on my new created harmony switches they just jump back and turn off again and the activity in harmony is not starting. So some sort of configuration error in the switches.yaml
I checked and if I call the service via dev tools. That works fine.
What can else can I check to figure out where the problem is?
Also the PlayStation Switch turns on/off but gives me an error:
Fehler beim Aufrufen des Service switch/turn_on. Unable to find service media_player/playstation_4
OR
Fehler beim Aufrufen des Service switch/turn_off. Unable to find service media_player/playstation_4
I also checked in the dev tools if it works and there it turns the ps4 on/off.
I’m no expert on templates, but isn’t your value template asking if the current activity is already true? I.e. if the current activity state is “Netflix”, then turn on “Netflix”. The logic sounds backwards to me.
is_state_attr('device_tracker.paulus', 'battery', 40) will test if the given entity attribute is the specified state (in this case, a numeric value).
My understanding is, that if the current activity on the harmony hub is heimkino and set the display in the UI to true and idk if it runs turn_on but i don’t think so. But I got it running. If somebody knows that it’s wrong and how I would have to do it correct please let me know. but as long it runs I’m fine with it
You are effectively agreeing with me
Your setup is testing if the current activity is “Heimkino”. The returned value may be TRUE or FALSE. But you are not using that result as a condition to execute the turn-on sequence. If you change the current_value attribute in the value_template to be something else. e.g. “Fred_Flintstone”, I’ll bet it has no effect on the turn_on and turn_off actions.
Well yes we agree on what it does. But in my opinion it does what it should do, set the state of the switch. If I would change as you suggested as far as I understand it, the turn_on and turn_off would still work but the switch wouldn‘t display that correctly and wouldn’t be on when the activity on the harmony is on. Right? Or for what would you then use current_value for?
Correct me if I‘m wrong.