We all have lovelace. With so many options around (custom buttom cards etc) sometimes we need to have a fresh view on how it can be done differently. So if anyone has an example of a temp control card - would love to see how it’s being done.
For example working on the following.
Room temp card done just with entities (Bedroom). Taking tooo much space and looking ugly
It shows the temperature in the room 1.
Setpoint for the day temperature 2
Setpoint for night temperature 3
Valve position on the radiator 4
Hostory graph for valve position 5.
Thanks. Not exactly what i meant. Maybe HA commuity would share their screenshots on how they have done it. This would also provide inspiration on the logic they have used for such a task
tom_l
February 12, 2022, 4:22am
4
Oh right. Sorry for the misunderstanding.
Here’s mine:
The reason for the bar graph temperature is that the temperature reported on the thermostat is the system temperature, not the room temperature. They just happen to be the same at the moment. Usually they’re not, like this (you can also see how the bottom section expands to reveal the settings. It uses fold entity row):
I also have this graph:
Where space is a little cramped I use this:
5 Likes
Exactly what i wanted. Idea with the collapsible automations i what i was looking for! Thanks!
Really neat styling of the dashboard. Do you have a descriton of it somewhere?
tom_l
February 12, 2022, 7:36am
6
https://community.home-assistant.io/t/day-and-night/116232/31?u=tom_l
It has one minor issue at the moment, that only occurs if the window is open as sunset occurs and the theme is switched.
opened 09:49AM - 26 Nov 21 UTC
closed 11:01PM - 27 Dec 23 UTC
My Home Assistant version: 2021.11.5
My lovelace configuration method (GUI or… yaml): GUI
What I am doing: Changing card-mod themes with an automation.
What I expected to happen: Card backgrounds to change.
What happened instead: Card backgrounds do not update until the page is refreshed. Behaviour was introduced in card-mod v3.1.1 and has been absent since this issue was previously resolved here: https://github.com/thomasloven/lovelace-card-mod/issues/66#issuecomment-788791065
Day theme:
![Screenshot 2021-11-26 at 20-45-54 Administration - Home Assistant](https://user-images.githubusercontent.com/10679300/143560982-2bad397d-d763-480e-b235-9069672daf81.png)
Night theme selected but card backgrounds do not update:
![Screenshot 2021-11-26 at 20-46-05 Administration - Home Assistant](https://user-images.githubusercontent.com/10679300/143561045-73353583-5bdf-4465-a433-e6b07b092e21.png)
After a page refresh the backgrounds are displayed correctly:
![Screenshot 2021-11-26 at 20-46-19 Administration - Home Assistant](https://user-images.githubusercontent.com/10679300/143561119-c3a53e5a-d267-4384-b873-4080c123563c.png)
**Minimal** steps to reproduce: See config below
The issue occurs when changing the theme with an automation. Only the card backgrounds fail to update.
automation
```
- alias: 'Select Theme'
trigger:
- platform: state
entity_id: input_select.select_theme
action:
service: frontend.set_theme
data:
name: "{{ states('input_select.select_theme')|lower }}"
```
input select
```
select_theme:
name: Select Theme
options:
- Day
- Night
```
themes
```
day:
card-mod-theme: day
card-mod-card: |
ha-card.top-level-card {
border: solid 1px var(--primary-text-color);
background: linear-gradient(rgba(147, 171, 202, 1), rgba(255, 255, 255, 0.6) 56px, rgba(255, 255, 255, 0.6) 100%); #url("/local/background/card_bg_Day.png");
}
night:
card-mod-theme: night
card-mod-card: |
ha-card.top-level-card {
border: solid 1px var(--secondary-text-color);
background: linear-gradient(rgba(57, 103, 158, 1), rgba(0, 0, 0, 0.6) 56px, rgba(0, 0, 0, 0.6) 100%); #url("/local/background/card_bg_Night.png");
}
```
Error messages from the browser console: none
---
**By putting an X in the boxes ([]) below, I indicate that I:**
- [X] Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).
- [X] Have made sure I am using the latest version of the plugin.
- [X] Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.
- [X] Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.
tom_l:
For this one. Is it a vertical stack? Thermostat + two bar cards and then a foldable one?
I’m guessing stack-in-card
tom_l
February 12, 2022, 8:52am
9
It’s actually an entities card. Using this:
Funny thing about lovelace - cards, rows in the entities card, badges and elements in the picture-elements card work exactly the same behind the scenes.
That means that you can use them interchangeably if you know how, and e.g. put a button right in an entities card, a badge somewhere in the middle of your view or a markdown card (with background and border removed) right in your carefully crafted picture-elements card. Pretty neat stuff that allows for some fantastic creations.
However. Becau…
entities:
- type: custom:hui-element
card_type: thermostat
entity: climate.downstairs
card_mod:
class: inline-card-no-border
- animation:
state: 'off'
columns: '1'
direction: right
entities:
- entity: sensor.rumpus_room_temperature
icon: mdi:thermometer
max: '40'
min: '-10'
name: Temperature
severity:
- color: '#039BE5'
from: '-10'
to: '17.9'
- color: '#0da035'
from: '18'
to: '22.9'
- color: '#e0b400'
from: '23'
to: '24.9'
- color: '#e45e65'
from: '25'
to: '40'
target: '18'
- entity: sensor.downstairs_heat_pump_power
max: '4000'
min: '0'
name: Power
severity:
- color: '#039BE5'
from: '0'
to: '299.9'
- color: '#0da035'
from: '300'
to: '899.9'
- color: '#e0b400'
from: '900'
to: '1799.9'
- color: '#e45e65'
from: '1800'
to: '4000'
entity_row: true
height: 28px
positions:
icon: inside
indicator: inside
minmax: 'off'
name: inside
title: 'off'
value: inside
type: custom:bar-card
value_style:
color: var(--primary-text-color)
text-shadow: none
- card_type: custom:fold-entity-row
entities:
- entity: automation.downstairs_aircon_am_schedule
name: Enable AM Schedule
type: custom:multiple-entity-row
toggle: true
state_color: true
entities:
- entity: input_datetime.downstairs_ac_am_on_time
name: AM On
- entity: input_datetime.downstairs_ac_am_off_time
name: AM Off
- entity: automation.downstairs_aircon_pm_schedule
name: Enable PM Schedule
type: custom:multiple-entity-row
toggle: true
state_color: true
entities:
- entity: input_datetime.downstairs_ac_pm_on_time
name: PM On
- entity: input_datetime.downstairs_ac_pm_off_time
name: PM Off
- entity: automation.downstairs_boost_on
name: Boost
- entity: input_boolean.downstairs_ac_workday
state_color: true
- entity: input_number.downstairs_ac_heat_temp_set
- entity: input_number.downstairs_ac_cool_temp_set
- entity: input_number.downstairs_ac_temp_set_heat
name: AC Heat Set Temp
- entity: input_number.downstairs_ac_temp_set_cool
name: AC Cool Set Temp
- entity: binary_sensor.downstairs_ac_am_automation_time_active
state_color: true
- entity: binary_sensor.downstairs_ac_pm_automation_time_active
state_color: true
- entity: binary_sensor.downstairs_ac_heat_required
state_color: true
- entity: binary_sensor.downstairs_ac_cool_required
state_color: true
- entity: sensor.downstairs_preset_mode
head:
label: Automation
type: section
padding: 0
type: custom:hui-element
show_header_toggle: false
title: Downstairs
type: entities
card_mod:
class: top-level-card
2 Likes
Thanks once again.
Using your ideas i came to a dream solution
Vertical stack per floor. Then use the entity:row plus folding
Only thing i am missing is how to remove that trv_bedroom_position line
This is the code i use
type: vertical-stack
cards:
- type: entities
title: 2ой Этаж
icon: mdi:bed
entities:
- type: custom:fold-entity-row
head:
entity: climate.trv_bedroom
type: custom:multiple-entity-row
name: Спальня
attribute: current_heating_setpoint
unit: C
secondary_info:
name: В комнате
entity: sensor.temp_kids_temperature
unit: C
entities:
- sensor.trv_bedroom_position
name: THIS BREAKS CONFIG
entities:
- input_number.temp_day_bed
- input_number.temp_night_bed
- sensor.trv_bedroom_position
- climate.trv_bedroom
As soon as i insert the name: THIS BREAKS CONFIG
I get
bad indentation of a sequence entry (21:19)
18 | unit: C
19 | entities:
20 | - sensor.trv_bedroom_position
21 | name: THIS BREAKS CONFIG
------------------------^
22 |
23 |
tom_l
February 12, 2022, 12:14pm
11
Changed the one below for label. But actually name also works. The config in question which breaks is for custom:multiple-entity-row and not for the fold one
tom_l
February 13, 2022, 2:47am
13
Oh right. If you want to supply a name you have to declare the entity like this:
entities:
- entity: sensor.trv_bedroom_position
name: THIS WONT BREAK THE CONFIG
This pretty much goes for all loveloace cards.
you can supply a simple list of entities:
entities:
- sensor.something
- switch.something
- cover.something
But if you want to change the appearance of an entity you must do this:
entities:
- sensor.something
- entity: switch.something
name: new name
icon: mdi:whatever
- cover.something
1 Like