Jmi
(Jean-Michel)
March 19, 2021, 8:37am
1
Hello,
I have some universal media_player used to select some action to perform in Apple HomeKit.
Unfortunatelly since a few time the list of source doesn’t show anymore in Home Assistant (and therefore in Homekit)
It’s quite strange because it was working fine… and then stopped.
Here is my configuration
in configuration.yaml
media_player:
- platform: universal
name: Chauffage
commands:
turn_on:
service: input_select.select_option
entity_id: input_select.chauffage
data:
option: Normal
turn_off:
service: input_select.select_option
entity_id: input_select.chauffage
data:
option: Eté
select_source:
service: input_select.select_option
data_template:
entity_id: input_select.chauffage
option: >-
{% if source == 'Normal' %}
Normal
{% elif source == 'Confinement' %}
Confinement
{% elif source == 'Visite' %}
Visite
{% elif source == 'Présent' %}
Présent
{% elif source == 'Télétravail' %}
Télétravail
{% elif source == 'Absence longue' %}
Absence longue
{% elif source == 'Absence courte' %}
Absence courte
{% elif source == 'Eté' %}
Eté
{% else %}
Normal
{% endif %}
attributes:
state: input_boolean.homekit_chauffage
source: input_select.chauffage
in input_select.yaml
chauffage:
name: Etats du Chauffage
icon: mdi:home-minus
options:
- Normal
- Confinement
- Visite
- Présent
- Télétravail
- Absence courte
- Absence longue
- Eté
in customize.yaml
chauffage:
name: Etats du Chauffage
icon: mdi:home-minus
options:
- Normal
- Confinement
- Visite
- Présent
- Télétravail
- Absence courte
- Absence longue
- Eté
And the result which unfortunatelly doesn’t show the list of sources anymore
For what it’s worth, I got the same problem after upgrading to 2021.3.x
petro
(Petro)
March 21, 2021, 6:00pm
3
universal media player typically only shows controls when the device is on.
This did work previously and volume controls are still shown when the device is on. Only source selection is missing.
Jmi
(Jean-Michel)
March 21, 2021, 8:36pm
5
I openned a bug, since it’s a regression compared to previous versions : https://github.com/home-assistant/frontend/issues/8673
Jmi
(Jean-Michel)
June 19, 2021, 4:09pm
6
Did someone find a solution to this issue ?
Jmi
(Jean-Michel)
July 22, 2021, 9:02pm
7
Adding a children: entry, I managed to get it working again.
petro
(Petro)
July 23, 2021, 11:02am
8
Can you please use home assistant lingo and explain what you did so other users coming to this thread can work around the issue? Thanks.
Jmi
(Jean-Michel)
July 23, 2021, 1:28pm
9
What is home assistant lingo ?
As explained above, I added one entry in the configuration of the media_player config to indicate that one entity is used as a children.
From :
media_player:
- platform: universal
name: Chauffage
commands:
turn_on:
service: input_select.select_option
entity_id: input_select.chauffage
data:
option: Normal
turn_off:
service: input_select.select_option
entity_id: input_select.chauffage
data:
option: Eté
select_source:
service: input_select.select_option
data_template:
entity_id: input_select.chauffage
option: >-
{% if source == 'Normal' %}
Normal
{% elif source == 'Confinement' %}
Confinement
{% elif source == 'Visite' %}
Visite
{% elif source == 'Présent' %}
Présent
{% elif source == 'Télétravail' %}
Télétravail
{% elif source == 'Absence longue' %}
Absence longue
{% elif source == 'Absence courte' %}
Absence courte
{% elif source == 'Eté' %}
Eté
{% else %}
Normal
{% endif %}
attributes:
state: input_boolean.homekit_chauffage
source: input_select.chauffage
To (search for children)
media_player:
- platform: universal
name: Chauffage
children:
- media_player.cuisine
commands:
turn_on:
service: input_select.select_option
entity_id: input_select.chauffage
data:
option: Normal
turn_off:
service: input_select.select_option
entity_id: input_select.chauffage
data:
option: Eté
select_source:
service: input_select.select_option
data_template:
entity_id: input_select.chauffage
option: >-
{% if source == 'Normal' %}
Normal
{% elif source == 'Confinement' %}
Confinement
{% elif source == 'Visite' %}
Visite
{% elif source == 'Présent' %}
Présent
{% elif source == 'Télétravail' %}
Télétravail
{% elif source == 'Absence longue' %}
Absence longue
{% elif source == 'Absence courte' %}
Absence courte
{% elif source == 'Eté' %}
Eté
{% else %}
Normal
{% endif %}
attributes:
state: input_boolean.homekit_chauffage
source: input_select.chauffage```
1 Like
petro
(Petro)
July 23, 2021, 1:34pm
10
Thanks, this lingo was unclear to me, and potentially others:
Jmi:
Adding a children: entry
The lingo I would expect: “I added a media_player entity_id to children”
Got a different problem then but also found a solution. Currently it is important to not use whitespace when defining the source_list
attribute.
See home-assistant/core#53804
service: media_player.select_source
data:
source: Netflix
target:
entity_id: media_player.sony_bravia_tv
Open a app like Netflix work in the media player pick th application and it works but not in service