I checked - and double checked. The new debug version does however say “Bound to: NONE” - which is so strange, 'cos I have added the two hex-segments (id). And I have restarted. Cleared the cahce for files only. And restarted and checked if the id had changed. Still no binding is being made.
Could you post your player-config.js?
Do you get any errors in your browser log?
Yes! on my Chrome PC I’m getting 3 columns and on my iPhone only 1 so it’s working beautifully now!
Thanks so much.
Hi, this only error I get is still the attribute-error.
I have placed the two .js files under the “www” folder. And the .py file is placed under “custom_components/media_player” folder.
I am using Chrome browser, latest version.
This is the config file:
setTimeout(function() {
// Add your bindings here
// Example:
LovelacePlayer.bind(“media_player.kitchen_dashboard”, “0184f1f8-a59c01db”);
// Remove this line when you found your Device ID
// LovelacePlayer.debug();
}, 200);
And just to verify all I have done:
configuration.yaml:
media_player:
- platform: floorplan_speaker
name: my_lovelace_player
tts:
- platform: google
In ui-lovelace.yaml i have entered the resources in the top of the file:
- url: /local/lovelace-player.js
type: js
- url: /local/lovelace-player-config.js
type: js
And in ui-lovelace.yaml i get the player up just fine by entering:`
- icon: mdi:theater
id: theater
title: theater
cards:
- type: media-control
entity: media_player.my_lovelace_player
Do you think it might be that your media player is named media_player.my_lovelace_player
but you are trying to bind your browser to media_player.kitched_dashboard
?
How did you force the number of columns? I want to have 5 columns instead of the standard 4. column-card always displays only one column for me. I changed max-width in column-card.js. My config:
- id: energy
icon: mdi:power-plug
title: 'Energia'
cards:
- type: custom:column-card
cards:
- type: entities
title: 'Miesięczne zużycie energii'
show_header_toggle: false
entities:
- sensor.light_bulbs_salon_energy
- sensor.light_leds_salon_energy
- type: history-graph
title: 'Zużycie energii'
hours_to_show: 48
refresh: 60
entities:
- sensor.light_leds_salon_power
- sensor.light_bulbs_salon_power
- type: entities
title: 'UPS'
show_header_toggle: false
entities:
- sensor.ups_status
- sensor.ups_battery_charge
- sensor.ups_battery_runtime
- sensor.ups_load
- sensor.ups_battery_voltage
- sensor.ups_input_voltage
- type: entities
title: 'Baterie termostatów'
show_header_toggle: false
entities:
- sensor.battery_thermostat_salon
- sensor.battery_thermostat_kuchnia
- sensor.battery_thermostat_antresola
- sensor.battery_thermostat_antek
- sensor.battery_thermostat_sypialnia
- sensor.battery_thermostat_lazienka
- type: entities
title: 'Baterie przełączników'
show_header_toggle: false
entities:
- sensor.battery_switch_light_salon_1
- sensor.battery_switch_light_salon_2
- sensor.battery_switch_light_antek
- type: entities
title: 'Baterie sensorów temperatury'
show_header_toggle: false
entities:
- sensor.battery_temp_humi_sensor_salon
- sensor.battery_temp_humi_sensor_pracownia
- sensor.battery_temp_humi_sensor_goscinny
- sensor.battery_temp_humi_sensor_antresola
- sensor.battery_temp_humi_sensor_gabinet
- sensor.battery_temp_humi_sensor_antek
- sensor.battery_temp_humi_sensor_sypialnia
- sensor.battery_temp_humi_sensor_lazienka
- sensor.battery_temp_humi_sensor_outdoor
- type: entities
title: 'Baterie sensorów ruchu'
show_header_toggle: false
entities:
- sensor.battery_body_sensor_przedpokoj
- sensor.battery_body_sensor_salon_1
- sensor.battery_body_sensor_salon_2
- sensor.battery_body_sensor_schody
- sensor.battery_body_sensor_antresola
- sensor.battery_body_sensor_antek
- sensor.battery_body_sensor_sypialnia
- type: entities
title: 'Baterie sensorów okien/drzwi'
show_header_toggle: false
entities:
- sensor.battery_window_sensor_kuchnia
- sensor.battery_door_sensor_pracownia
- sensor.battery_window_sensor_antresola
- sensor.battery_door_sensor_sypialnia
And the effect:
Hi Thomas, was that an answer to me? I do not have this entity: “media_player.kitched_dashboard”
- title: TV & Movies
icon: mdi:kodi
panel: true
cards:
- type: custom:column-card
# - type: horizontal-stack
cards:
- type: custom:upcoming-media-card
service: deleted
- type: custom:upcoming-media-card
service: deleted
- type: entities
title: Newsgroups
entities:
- sensor.etc etc
Changed line 91 as per Thomas’ instructions in above post
But instead of the horizontal-stack I used custom column card as you see it commented.
I forgot about panel: true
. Thanks.
Exactly, and yet…
Gee you are right. I’ll fix that When I get home. I am so sorry - don’t know why I didn’t see that.
It’s possible to combine “folding-group-entity-row” with “time-input-row”?
I have a group with some switches and some input_datetime and I want the input_datetime components to work like time-input-row…
Thinking that the time-input-row
would be great to include in an alarm clock card. I might have to look into that! Great stuff!
I’ll definitely use it! Thanks!
Yes, see the example on github. Just put type: custom:time-input-row
under config:
.
It’s all entities of the group or none, though.
Hi Thomas,
It works like a charm now - thanks. It is so great!!!
I noted two things:
- When calling tts and calling tts again without having the first one being completed, hassio stalls, and I have to reboot hassio. I guess it is not that often it will be a problem.
- There is a typo in the installation instruction - bullet 2. floorplay_speaker.py. It should have been floorplan_speaker.py
BR
Martin
Glad to hear it!
And thanks for finding the typo. I’ve corrected it.
Thanks a lot @thomasloven, your lovelace generator works like a charm!
I just got an issue when i try to launch the script from shell_comand component, like it did not run in the correct env, with this error:
File "lovelace-gen.py", line 31, in <module>\n import yaml\nImportError: No module named \'yaml\'
No issue when running the script in venv with Home Assistant user.
I like to use HASS configurator, and it would be very great if I can trigger Lovelace rebuild from ui.
Help would be appreciated
That’s correct. The script should be run in the same python environment as home-assistant (especially if you wish to use the states feature).
If you use a virtual env to run hass you can run the script with
<path to venv root>/bin/python3 <path to hass config>/lovelace-gen.py