Bonjour a vous,
Je reprends mon lovelace pour passe sur decluterring-card mais je ne comprends rien.
je suivie le tuto avec ce liens 'https://forum.hacf.fr/t/carte-decluttering-card-reduiser-vos-lignes-de-code-lovelace/4580/5
et ca fonctionne.
Quand je rentre ca dans mon lovelace j’ai bien le sun.sun qui fonctionne
decluttering_templates:
entity:
card:
type: entities
entities:
- entity: '[[entity]]'
name: '[[name]]'
icon: mdi:[[icon]]
secondary_info: last-updated
light_button_with_brightness:
tap_action:
action: toggle
hold_action:
action: more-info
layout: icon_label
show_label: true
label_template: >
var bri = Math.round(entity.attributes.brightness / 2.55); return (bri ?
bri : '0') + '%';
show_name: true
state:
- styles:
card:
- box-shadow: 0px 0px 10px 3px var(--paper-item-icon-active-color)
icon:
- color: var(--paper-item-icon-active-color)
value: 'on'
styles:
card:
- border-radius: 15px
- height: 76px
- width: 76px
- margin: 5px 5px 0px 0px
- padding: 0px 0px
- '--paper-card-background-color': rgba(40, 40, 40, 0.5)
grid:
- grid-template-rows: 42px auto 0px
- grid-template-columns: 42px auto
icon:
- width: 30px
- color: white
label:
- font-size: 12px
- font-weight: bold
- color: white
name:
- justify-self: start
- align-self: end
- padding: 9px 10px
- font-size: 12px
- font-weight: bold
- color: white
je cree la card
type: custom:button-card
template: light_button_with_brightness
entity: light.ampoule_salon_2
name: Kitchen
icon: mdi:lightbulb
Merci pour vos retours.
System Health
version
core-2022.3.3
installation_type
Home Assistant Supervised
dev
false
hassio
true
docker
true
user
root
virtualenv
false
python_version
3.9.9
os_name
Linux
os_version
4.19.0-17-amd64
arch
x86_64
timezone
Europe/Paris
Home Assistant Community Store
GitHub API
ok
GitHub Content
ok
GitHub Web
ok
GitHub API Calls Remaining
2522
Installed Version
1.23.0
Stage
running
Available Repositories
1018
Downloaded Repositories
70
AccuWeather
can_reach_server
ok
remaining_requests
5
Home Assistant Cloud
logged_in
false
can_reach_cert_server
ok
can_reach_cloud_auth
ok
can_reach_cloud
ok
Home Assistant Supervisor
host_os
Debian GNU/Linux 10 (buster)
update_channel
beta
supervisor_version
supervisor-2022.03.2
docker_version
20.10.8
disk_total
113.6 GB
disk_used
23.2 GB
healthy
true
supported
failed to load: Unsupported
supervisor_api
ok
version_api
ok
installed_addons
Samba share (9.5.1), MQTT Server & Web client (1.2.0), Terminal & SSH (9.3.0), Spotify Connect (0.10.0), Grafana (7.4.1), Tydom2MQTT - Beta (release_v1.2.4), InfluxDB (4.3.0), Glances (0.14.2), Dnsmasq (1.4.4), Duck DNS (1.14.0), Studio Code Server (4.1.0), File editor (5.3.3), Zigbee2mqtt (1.24.0-1), Zigbee2mqtt Edge (edge), ESPHome (2022.2.6), Node-RED (11.0.4), Check Home Assistant configuration (3.10.0), Mosquitto broker (6.0.1)
Lovelace
dashboards
3
resources
45
views
16
mode
storage
Spotify
api_endpoint_reachable
ok
Bonjour
Et c’est quoi le problème en fait…
Bob
Bob
Mars 10, 2022, 12:17
4
Je n’utilise pas ça mai il ne te manquerai pas ce petit bout :
entity:
default:
- name: Kitchen
- entity: light.ampoule_salon_2
- icon: mdi:lightbulb
Et comme le demanderai beaucoup ici, que veux tu faire exactement ?
@nonome1 Je pense que le message est plutôt explicit en fait « You should define either a card or an element in the template. »
Dans ton « light_button_with_brightness: » tu n’as pas de carte, ça n’a pas l’air comme ça dans le tuto.
:rolf:
je possede ca comme carte light
type: custom:button-card
show_entity_picture: true
state:
- value: 'on'
color: rgb(201, 244, 254)
entity_picture: null
spin: false
styles:
name:
- color: rgb(0, 0, 0, 100%)
- font: bold italic 15px/30px roboto
- text-shadow: 2px 5px 8px rgb(255, 255, 254)
card:
- background-color: rgb(89, 166, 128, 100%)
- value: 'off'
styles:
name:
- color: rgb(89, 166, 128, 100%)
- font: bold italic 15px/30px roboto
- text-shadow: 2px 5px 8px rgb(89, 166, 128)
styles:
card:
- margin: 0
- padding: 1
- font: 20px/35px Roboto
- background: null
- box-shadow: 0px 0px 10px rgb(89, 166, 128, 100%)
tap_action:
action: toggle
entity: switch.switchsalon_l1
aspect_ratio: 1/0.6
hold_action:
action: fire-dom-event
browser_mod:
command: popup
deviceID:
- this
- dashboard
title: Salon
style:
$: |
.mdc-dialog .mdc-dialog__container {
width: 40%;
}
.mdc-dialog .mdc-dialog__container .mdc-dialog__surface {
width:40%;
box-shadow:none;
}
.: |
:host {
--mdc-theme-surface: rgba(0,0,0,0);
--secondary-background-color: rgba(0,0,0,0);
--ha-card-background: rgba(0,0,0,0);
--ha-card-box-shadow: none;
--mdc-dialog-scrim-color: rgba(0,0,0,0.8);
--mdc-dialog-min-height: 100%;
--mdc-dialog-min-width: 100%;
--mdc-dialog-max-width: 100%;
}
mwc-icon-button {
color: #FFF;
}
card:
type: custom:light-popup-card
entity: light.ampoule_salon_2
actionsInARow: 8
brightnessWidth: 150px
brightnessHeight: 400px
switchWidth: 150px
switchHeight: 400px
actions:
- color: '#8BCBDD'
service: automation.toggle
service_data:
entity_id: automation.rainbow_lampe_elena
settings:
openButton: Réglages
closeButton: Fermer
settingsCard:
type: entities
cardOptions:
entities:
- type: custom:button-card
entity: light.ampoule_salon_2
toggle: true
je voudrais en faire un decluterring car j’ai 11 light donc a chaque modification 11 modification