You have the latest version of lovelace-gen and your folder and file is at /config/lovelace/main.yaml
?
Sorry, it was my bad. First time using python scripts and thought that it gets automatically from GitHub. Now I add to my controller and everything works just perfect
Thanks a lot for the help, and for script, love it
is there a way that this could be used to select the background for the view? maybe from the home view </lovelace/0> and be able to select the desired backgrounds to display with the other views? or possible with a random select type template from a list? I have tons of background images I use and I haven’t ran across this set up yet and don’t know if it is possible. Thanks for the awesome-ness of your work BTW!
Hello,
I’m not quite sure if this is the right place to post my problem, but maybe someone can give me a tip.
I’m using “card-tools” in my Lovelace setup.
Everything worked fine till the 0.85 update yesterday.
I’m now getting:
…/local/card-tools.js?v=0.0.1:44:22 TypeError: null is not an object (near ‘…firstChild…’)
every time I’m opening the Lovelace interface or switching between views.
When deleting everything inside my ui-lovelace.yaml except
- url: /local/card-tools.js?v=0.0.1
type: js
and one view with one simple sensor badge I get:
…/local/card-tools.js?v=0.0.1:41:64 TypeError: null is not an object (near ‘…ha-panel-lovelace")…’)
Does anyone know what’s going on?
Thank you a lot.
EDIT: though it throws the error, everything looks as it should…
I am getting from lovelace-gen.py script error that returns error code: 1. I did’t upgrade nothing. Runing the same version off add-on’s and Hassio as before, as this script was working perfect.
I was about to say no, but then I had an idea and got held up for a few days trying it out.
Now I’d say kind-of…
What you could do is make a view with panel: true
in which you put a layout-card, and then you style that layout-card using card-modder.
Unfortunately, I haven’t been able to get the background to extend past the bottom of the lowermost card using this method, but I’d guess that’s just a question about finding the right css options. Try playing around with the styles a bit.
- title: Background
panel: true
cards:
- type: custom:card-modder
style:
background-image: "url(http://www.placekitten.com/800/600)"
display: block #THIS IS ESSENTIAL!
card:
type: custom: layout-card
cards:
- type: entities
entities:
...
I can’t seem to reproduce this.
Do you have the latest version of card-tools?
In the old version of the script return code 1 means that it was called with bad arguments.
Try getting the latest version from github and check the instructions to make sure you are running it the correct way.
I tried and just used the latest script. But having the same issue:
Fri Jan 11 2019 13:35:59 GMT+0200 (Eastern European Standard Time)
Error running command: python /config/python_scripts/lovelace-gen.py
, return code: 1
NoneType: None
The latest version should never return 1.
What are you using to run it?
It’s not supposed to be in /config/python_scripts/
or to be run as a python_script
.
… to be fair, that would make sense, though…
I can see that in your script there isn’t return value 1.
I am using:
shell_command:
lovelace_gen: 'python /config/python_scripts/lovelace-gen.py'
Your script is in my created folder /python_scripts.
Ok. I managed to reproduce this on mobile.
I think I have fixed it in the latest card-tools update.
Excellent!! Thank you so much for these!!
I had the problem on Safari (Mac) and iOS (iPad and iPhone).
I installed the new version from GitHub and now it happens 1 out of 5 times (refreshing or reopening).
/local/card-tools.js?v=0.1.0:44:20 TypeError: null is not an object (near ‘…firstChild…’)
I then tried it in Chrome and there I’m always getting:
/local/card-tools.js?v=0.1.0:45:9 Uncaught TypeError: Cannot read property ‘dispatchEvent’ of null
I also tried:
javascript_version: es5, latest and auto. Nothing changed.
Not sure what I’m doing wrong but thanks for your help.
Ok. Try now.
Awesome!
As far as I can tell (in this short amount of time) it’s now working perfectly.
I will tell if it ever happens again.
Thank you a lot for helping
browser-commander
Now here’s another one I’m really proud of, but it’s getting late over here, so for now I’ll just leave you with a link and a video showing the development version.
I’ll update this post when I’ve had some sleep.
Regarding the folding entity card…
I configure this thus:
- type: entities
title: Folding Groups
show_header_toggle: false
entities:
- type: custom:fold-entity-row
head: group.all_automations
- type: custom:fold-entity-row
head: group.scenes
but then in Lovelace, (Storage Mode) after I paste this in raw config, it replaces it with this:
- type: entities
title: Folding Groups
show_header_toggle: false
entities:
- type: 'custom:fold-entity-row'
head: group.all_automations
items:
- automation.beta_update_available
- automation.close_garage_and_set_alarm
- automation.coffee_maker_off
- automation.coffee_maker_on
- automation.deactivate_alarm_and_open_garage
- automation.home_and_away_off
- automation.home_and_away_on
- automation.lights_off_failsafe
- automation.lights_on_failsafe
- automation.make_snapshot_copy_backups_to_dropbox
- automation.power_state_sonoff_on_ha_start_up
- automation.sonoff_firmware_installed
- automation.system_runtime
- automation.tasmota_initial_setup_all_devices
- automation.toothbrush_off
- automation.toothbrush_on
- automation.turn_lounge_light_on_elevation_25deg_after_4pm
- automation.update_available
- type: 'custom:fold-entity-row'
head: group.scenes
items:
- scene.bedtime
- scene.dining_daylight
- scene.dining_normal
- scene.dining_warm
- scene.lounge_100
- scene.lounge_daylight
- scene.lounge_movie
- scene.lounge_normal
- scene.lounge_warm
- scene.office_all
- scene.office_daylight
- scene.office_main
- scene.office_warm
- scene.desk_daylight
- scene.desk_normal
- scene.desk_warm
in the raw editor… so what happens if I add new automations or scenes? Is the list supposed to refresh?
Interestingly, if I open up the .storage/lovelace file in an editor it looks like this:
{
"entities": [
{
"head": "group.all_automations",
"type": "custom:fold-entity-row"
},
{
"head": "group.scenes",
"type": "custom:fold-entity-row"
}
],
"show_header_toggle": false,
"title": "Folding Groups",
"type": "entities"
}
If I use configureui it also shows all the individual entities.
I’m confused.
If I add a scene or automation, do I need to trigger Lovelace to refresh this card?
Having the same here. The custom_updater is not showing the latest version of the card-tools.