thmry
February 15, 2019, 8:42am
835
I actually have the same issue, but I’m not using layout-card
or card-modder
. I am using compact-custom-header
though, but that seems to be the only resemblance.
My issue is actually with conditional
and button-card
(so conditionally showing certain button-card
s based on the state of a light group, which doesn’t seem to be related to any of @thomasloven ’s plugins.
Really nice setup btw @mcfrojd .
mcfrojd
(Mcfrojd)
February 15, 2019, 8:49am
836
– EDIT –
When i tried it in a incognito browser it WORKS with that new Layout Card.
I guess i had cache problems in normal browser.
– EDIT –
That card dont show up in custom updater, but i manually updated it and there is no positive change.
thomasloven
(Thomas Lovén)
February 15, 2019, 11:14am
837
This is why I sometimes wait an hour or two to answer some questions…
Glad it worked!
1 Like
roflcoopter
(Roflcoopter)
February 15, 2019, 11:23am
838
Nice setup! Do you mind sharing your full setup for that view?
What are you using to control TiVo? Is it a Harmony remote?
mcfrojd
(Mcfrojd)
February 15, 2019, 11:36am
839
I will publish this soon on my github, i need a couple of tweek more before im happy
Im using the TCP component to control my tivo.
You will find all info in this thread:
Hi
Iv just upgraded to Virgin and was given a TiVo box which can be controlled using various commands - once a telnet session has been established.
To find the ip of your Tivo box i tend to use a network scanner on my phone whilst connected to the same network, but im sure the ip is listed in settings of the box some where. You need to telnet to the box on using port 31339
Once connected you can send various commands to the box to do pretty much anything, although you need to enter the comman…
roflcoopter
(Roflcoopter)
February 15, 2019, 11:49am
840
Interesting, i guess i can do a spin-off from the short example you posted above
mcfrojd
(Mcfrojd)
February 15, 2019, 11:50am
841
@thomasloven or any lovelace / css guru.
Is it possible to have the “active” button on the top row with another background?
When i click the top “TIVO” button the “tivo” card is displayed, and so on, but how to have the navigation buttons to know that its active?
Is there som kind of state_filer?
Lovelace code:
---
icon: mdi:remote
cards:
- type: custom:compact-custom-header
###############################################################################################################
## Navigation Buttons
###############################################################################################################
- type: horizontal-stack
cards:
- type: custom:card-modder
card:
type: entity-button
icon: hide
name: TIVO
entity: input_boolean.shield_dummy
hold_action: none
tap_action:
action: call-service
service: input_select.set_options
service_data:
entity_id: input_select.remote
options: "TIVO"
style:
background-color: rgba(56,60,69,1)
border-radius: 20px
border: solid 3px rgba(255, 125, 125,1)
box-shadow: 3px 3px rgba(0,0,0,0.4)
- type: custom:card-modder
card:
type: entity-button
icon: hide
name: SHIELD
entity: input_boolean.shield_dummy
hold_action: none
tap_action:
action: call-service
service: input_select.set_options
service_data:
entity_id: input_select.remote
options: "SHIELD"
style:
background-color: rgba(56,60,69,1)
border-radius: 20px
border: solid 3px rgba(255, 125, 125,1)
box-shadow: 3px 3px rgba(0,0,0,0.4)
- type: custom:card-modder
card:
type: entity-button
icon: hide
name: TV KANALER
entity: input_boolean.shield_dummy
hold_action: none
tap_action:
action: call-service
service: input_select.set_options
service_data:
entity_id: input_select.remote
options: "CHANNELS"
style:
background-color: rgba(56,60,69,1)
border-radius: 20px
border: solid 3px rgba(255, 125, 125,1)
box-shadow: 3px 3px rgba(0,0,0,0.4)
- type: custom:card-modder
card:
type: entity-button
icon: hide
name: RADIO
entity: input_boolean.shield_dummy
hold_action: none
tap_action:
action: call-service
service: input_select.set_options
service_data:
entity_id: input_select.remote
options: "RADIO"
style:
background-color: rgba(56,60,69,1)
border-radius: 20px
border: solid 3px rgba(255, 125, 125,1)
box-shadow: 3px 3px rgba(0,0,0,0.4)
- type: custom:state-switch
entity: input_select.remote
states:
TIVO:
###############################################################################################################
## TIVO - SONOS CONTROLLER
###############################################################################################################
type: entities
entities:
- entity: input_boolean.shield_dummy
name: TIVO
SHIELD:
###############################################################################################################
## SHIELD CONTROLLER
###############################################################################################################
type: entities
entities:
- entity: input_boolean.shield_dummy
name: SHIELD
CHANNELS:
###############################################################################################################
## Favotite Channels
###############################################################################################################
type: entities
entities:
- entity: input_boolean.shield_dummy
name: TV Channels
RADIO:
###############################################################################################################
## Radio Channels
###############################################################################################################
type: entities
entities:
- entity: input_boolean.shield_dummy
name: RADIO
thomasloven
(Thomas Lovén)
February 15, 2019, 12:32pm
842
I really wanted to avoid adding any programming to card-modder, but you may just have convinced me…
It can be done now by adding a template sensor for each button which has as its value the color the background should be and then doing background-color: [[ sensor.shield_button_color ]]
or whatever…
I’ll see what I can do…
1 Like
Bieniu
(Maciek)
February 15, 2019, 5:04pm
843
@thomasloven After update layout-card to version 616f74 when I open HA hamburger menu I have error in log:
https://_redacted_/local/lovelace/layout-card.js?v=616f74:68:48 Uncaught TypeError: Cannot read property 'clientWidth' of null
Browser cache is cleaned.
My config:
- id: network
icon: mdi:ethernet
title: 'Sieć'
background: '#e5e5e5'
path: network
panel: true
cards:
- type: custom:layout-card
cards:
- ...
- ...
Dino-Tech
(Darren Wilson)
February 15, 2019, 7:40pm
844
@thomasloven This is what I was referring to on Discord. https://pastebin.com/HL54c57w
The latest ver#ab81587, displays this:
I reverted back to ver
97f3831 and this worked again:
I tried several different ways with the example you posted in Discord, but no luck.
Would like to use latest ver to play with animation enhancement.
Worse case scenario, can I rename the old version and run 2 versions so I can keep one version current? Any thoughts?
thomasloven
(Thomas Lovén)
February 15, 2019, 10:50pm
846
I just pushed a workaround for vertical-stack-in-card to github for card-modder. Try the new version c7fa10.
thomasloven
(Thomas Lovén)
February 15, 2019, 10:56pm
847
Some new updates
useful-markdown-card has been remade from the ground up. It should now work more like the original markdown card, but also has some new features (see below).
card-tools has been upgraded with more advanced templating options which means that…
card-modder now can e.g. apply different styles based on the state of an entity.
background-color: [[ if(light.my_lamp == "on", "yellow", "blue") ]]
A full description of the new template features is available at the github page for useful-markdown-card, which can also make full use of them.
1 Like
thomasloven
(Thomas Lovén)
February 15, 2019, 11:00pm
848
See the post above this one. You should now be able to do
type: custom:card-modder
card:
type: entity-button
name: TIVO
... etc ...
style:
background-color: [[ if(input_select.remote == "TIVO", "blue", "rgba(56, 60, 69, 1)") ]]
... etc ...
Requires upgrading card-tools (but not card-modder, technically. Though you should probably do that anyway…)
VDRainer
(🍻)
February 16, 2019, 1:25am
849
Had a lot to edit, update and test.
Now i’m getting
2019-02-16 02:20:04 ERROR (MainThread) [frontend.js.latest.201902150] http://192.168.1.123:8123/customcards/card-modder.js:74:54 SyntaxError: missing ) after condition
@VDRainer i have this:
https://xxxx.org/local/lovelace/tomas_loven_cards/lovelace-card-modder/card-modder.js?v=30:74:55 Uncaught SyntaxError: Unexpected token {
iantrich
(Ian)
February 16, 2019, 2:16am
851
1 Like
@iantrich doesn´t work
Edit: i cleaned the cache and now it works
VDRainer
(🍻)
February 16, 2019, 9:02am
853
Thanks @iantrich , works now.
I also had to revert card-tools to 297fcc, because i wondered about the secondaryinfo-entity-row
The first showed fine, the second not???
- entity: sensor.e3dc_house_power
name: Haus
icon: mdi:home-outline
type: "custom:secondaryinfo-entity-row"
secondary_info: "[[ sensor.daily_house_energy.state ]] kWh"
- entity: sensor.e3dc_net_power
name: Netz
icon: mdi:transmission-tower
type: "custom:secondaryinfo-entity-row"
secondary_info: "Bezug: [[ sensor.daily_from_net_energy.state ]] kWh, Einsp.: [[ sensor.daily_to_net_energy.state ]] kWh"
mcfrojd
(Mcfrojd)
February 16, 2019, 10:07am
854
thomasloven:
background-color: [[ if(input_select.remote == “TIVO”, “blue”, “rgba(56, 60, 69, 1)”) ]]
I get this error when i try this:
2019-02-16 11:05:12 ERROR (SyncWorker_5) [homeassistant.util.yaml] while parsing a flow sequence in "/config/lovelace/views/13_test.yaml", line 28, column 30 expected ',' or ']', but got '<scalar>' in "/config/lovelace/views/13_test.yaml", line 28, column 95
But your example code on “useful-markdown-card” github page works fine with the new “if” states