Skip to content

Instantly share code, notes, and snippets.

@Mariusthvdb
Created October 26, 2022 07:33
Show Gist options
  • Save Mariusthvdb/eb90a6ba9431f9e3e4553a1ea023a3f0 to your computer and use it in GitHub Desktop.
Save Mariusthvdb/eb90a6ba9431f9e3e4553a1ea023a3f0 to your computer and use it in GitHub Desktop.
tem and humid iste
type: entities
entities:
- type: custom:mod-card
card_mod:
style: |
:host {
--stack-card-margin: 0px;
}
card:
type: horizontal-stack
cards:
- type: entities
title: Temp
card_mod:
class: class-header-margin
style: |
ha-card {
box-shadow: none;
margin: -16px -8px -16px -16px;
}
entities:
- entity: sensor.master_bedroom_hygro_temp_temperature
name: Master bedroom
- entity: sensor.dorm_marte_hygro_temp_temperature
name: Dorm Marte
- entity: sensor.garage_hygro_temp_temperature
name: Garage
- entity: sensor.library_hygro_temp_temperature
name: Library
- entity: sensor.office_wijke_hygro_temp_temperature
name: Office Wijke
- type: entities
title: Humidity
card_mod:
# class: class-header-margin
style: |
ha-card {
box-shadow: none;
margin: -16px -16px -16px -8px;
}
ha-card .card-header {
background-color: var(--background-color-off);
font-weight: 400;
font-size: 20px;
color: var(--text-color-off);
padding: 0px 12px;
margin: 0px 0px 16px 0px;
display: unset;
}
ha-card .card-header .name {
text-align: right;
}
entities:
- entity: sensor.master_bedroom_hygro_temp_humidity
name: Master bedroom
- entity: sensor.dorm_marte_hygro_temp_humidity
name: Dorm Marte
- entity: sensor.garage_hygro_temp_humidity
name: Garage
- entity: sensor.library_hygro_temp_humidity
name: Library
- entity: sensor.office_wijke_hygro_temp_humidity
name: Office Wijke
- type: custom:fold-entity-row
head:
type: section
label: Battery & connectivity
card_mod: &label
style: |
.label {
margin-left: 0px;
}
padding: 0
entities:
- type: custom:template-entity-row
entity: sensor.master_bedroom_hygro_temp_battery
<<: &config
name: >
{% set id = state_attr(config.entity,'friendly_name').split('hygro')[0] %}
{{id}}
state: >
{{states(config.entity)}} %
secondary: >
{% set id = config.entity.split('_battery')[0] %}
Signal: {{states(id + '_signal_strength')}} dBm
# : Batt: {{states(id + '_battery')}} %
- type: custom:template-entity-row
entity: sensor.dorm_marte_hygro_temp_battery
<<: *config
- type: custom:template-entity-row
entity: sensor.garage_hygro_temp_battery
<<: *config
- type: custom:template-entity-row
entity: sensor.library_hygro_temp_battery
<<: *config
- type: custom:template-entity-row
entity: sensor.office_wijke_hygro_temp_battery
<<: *config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment