petro
(Petro)
January 6, 2024, 3:39pm
41
Use the select entity if you don’t know how to call activities from the remote.turn_on service.
The select entity answers all your questions and solves all your problems.
Only 1 activity can be on at a time. It’s the main state of the select entity. If that’s not set to Watch Movie
, then the Watch Movie
activity is not on.
I guess I missed the updates on this topic.
In my case there are still 15 entries that need to be fixed. Yes it is a simple change…but it take time, and it still takes time…mostly to make sure you don’t break something during the change.
I will have to look at that plugin…
Mic
1 Like
olivermaor
(Oliver Maor)
January 14, 2024, 8:11pm
43
I still do not see the answer to my question:
I am afraid that I still not not quite understand what to do until the mid of 2024. I use the “switch” to retrieve the state of the remote. For example, if I watch TV, use a stick, or play the XBox, I want the Harmony Hub to switch the volume up and down every :05 minutes after the hour, because otherwise the TV automatically switches off (no joke, this is supposed to be a feature).
Therefore, I provided the following automation:
alias: Reactivate TV every hour
description: Shortly sets volume…
petro
(Petro)
January 15, 2024, 2:17am
44
Read what I wrote a number of days ago
Everyone coming to this thread
This will create all activities as switches
Simply copy/paste the following code chunk into your template editor.
Template Editor:
[Open your Home Assistant instance and show your template developer tools.]
Code Chunk:
{% set entity = 'remote.living_room' %}
switch:
- platform: template
switches:
{%- for activity in state_attr(entity, 'activity_list') %}
{%- set name = device_attr(entity, 'name_by_user') or device_attr(entity, 'name') %}
##…
Here is the type of error message I received.
switch.hub_receiver_power is being used in script.theater_mode_off. adjust script.theater_mode_off to fix this issue.
Here is what my script looked like before repair…
theater_mode_off:
alias: Everything Off
sequence:
- service: switch.turn_off
target:
entity_id: switch.hub_receiver_power
Here is the fix I did…
theater_mode_off:
alias: Everything Off
sequence:
- service: remote.send_command
target:
entity_id: remote.hub
data:
num_repeats: 1
delay_secs: 0.4
hold_secs: 0
command: PowerOff
device: 40278468
The command and device were found in the harmony_xxx.conf file.
The good news is as I transition away from Harmony…It is easier to understand where and how to put in the commands. (for example IR over IP devices)
Mic
khaosspawn
(khaosspawn)
January 22, 2024, 6:23pm
47
Hi Pedro,
I followed your instructions - but not sure what I did wrong. Nothing seems to have changed. I’m attaching some screenshots.
What do I do from here?
petro
(Petro)
January 22, 2024, 6:33pm
48
copy and paste that into configuration.yaml
petro:
If you don’t have a switch section in configuration.yaml, copy the entire response from the template editor and paste it into your configuration.yaml.
If you do have a switch section in configuration.yaml, only copy everything after the switch:
line.
khaosspawn
(khaosspawn)
January 22, 2024, 6:42pm
49
Where do I do that? Sorry I’m not as familiar with browsing these files.
khaosspawn
(khaosspawn)
January 22, 2024, 10:22pm
50
I managed to figure it out. Thanks @petro !
1 Like
I tried to add this template like:
configuration.yaml:
switch: !include_dir_merge_list switch/
inside switch/
harmony_schlafzimmer.yaml:
platform: template
switches:
### Harmony_Hub_Schlafzimmer FERNSEHEN Harmony Activty ###
I get errors:
Error loading /config/configuration.yaml: mapping values are not allowed here
in “/config/switch/harmony_schlafzimmer.yaml”, line 2, column 13
How can I get the template sorted into directories?
[EDIT] before platform a space was missing [/EDIT]
petro
(Petro)
January 25, 2024, 3:07pm
52
The contents should look like
- platform: switch
switches:
### Harmony_Hub_Schlafzimmer FERNSEHEN Harmony Activty ###
...
if it starts out like this…
- platform: switch
switches:
### Harmony_Hub_Schlafzimmer FERNSEHEN Harmony Activty ###
...
make sure the platform and switch are at the same indentation level.
There was a space missing before platform.
That now works
I’m just not sure how to get a switch to power off the activities.
petro
(Petro)
January 25, 2024, 3:50pm
54
You just say "turn off <activity name>"
or turn off the switch via the UI.
I thought so too.
The switch on activity works
Switch off doesn’t work.
Alexa replies with the sound for command done, but nothing happens.
In the HA logs I don’t find any entries for this
petro
(Petro)
January 25, 2024, 4:18pm
56
You can find any entity in developer tools → states page.
in my section:
smart_home:
I now have the new entities and switching with the alexa app works thanks for the help.
But in the past alexa got the frienldy names. How can I get friendly names? Alexa shows a weird mixture it looks like the frindly name with spaces between names but the first names are with underscores. Is there a way to give the friendly names I set in the template?
petro
(Petro)
January 26, 2024, 11:49am
58
change the friendly name in the UI like any other entity.
Perchman
(Fabi)
April 10, 2024, 9:20pm
59
Hi!
I just created an account to thank you!
I discovered that feature and combined to your code chunk it was so helpful!
1 Like
SHawn26
(Shawn)
April 27, 2024, 1:59pm
60
I have the same problem. I have two “hints” like the ones mentioned here and I’ve only been at it for 3 weeks and I don’t know how to help despite the hints.
Can you support me with this?
I have two automations and I’m not even sure if I need to make changes in both automations or just one automation.
Thanks for your support.
Shawn26
Here Automation #1:
alias: "Automat: Umgebungslicht einschalten "
description: |
trigger:
- platform: sun
event: sunset
offset: "-00:20:00"
condition:
- condition: state
entity_id: input_boolean.helfer_umgebungslicht
state: "off"
- condition: device
type: is_off
device_id: f30e4065ea5f84c9ee394009e2d06ab6
entity_id: 0a9104e807f6fb4aa3c76dcd6e2a967c
domain: light
- condition: device
type: is_off
device_id: 8b163d5e9f16fac0e0de78826864a898
entity_id: 2701e512c2dd5f5fe6ea244b63927645
domain: light
- condition: or
conditions:
- condition: state
entity_id: switch.sch_i_sh_003_harmonyhub_fernsehen
state: "on"
enabled: true
- condition: state
entity_id: switch.sch_i_sh_003_harmonyhub_video_gucken
state: "on"
enabled: true
action:
- type: turn_on
device_id: f30e4065ea5f84c9ee394009e2d06ab6
entity_id: 0a9104e807e6fb4aa3c76dcd6e2a967c
domain: light
- type: turn_on
device_id: 8b163d5e9f16fac0e0de78826864a898
entity_id: 2701e512c2dd5f5fe6ea244b63927645
domain: light
- service: input_boolean.turn_on
target:
entity_id: input_boolean.helfer_umgebungslicht
data: {}
mode: single
Here Automation #2:
alias: "Automat: Fernsehen Umgebungslicht"
description: |
trigger:
- platform: device
type: turned_on
device_id: c6c05b5c9f03beb960cb2a38e73971fe
entity_id: 52ab67fcec846e94aa29a188d34f1df0
domain: switch
enabled: true
- platform: device
type: turned_on
device_id: c6c05b5c9f03beb960cb2a38e73971fe
entity_id: 2cda07765af7273df1a1bdd288078d5c
domain: switch
enabled: true
condition:
- condition: sun
after: sunset
action:
- service: light.turn_on
metadata: {}
data: {}
target:
entity_id: light.ambilight
- service: light.turn_on
metadata: {}
data: {}
target:
device_id: 8b163d5e9f1ecdc0e0de78826864a898
mode: single
rvst1
(Stefan)
July 4, 2024, 9:18am
61
Thanks a lot for the script. Even tough to this day, I still don’t understand why we are removing something and are forced to go back to yaml files when all other things are moving away from yaml.
1 Like