bovil
(Andrew Trembley)
July 27, 2020, 11:34pm
1
I’ve got a Lovelace history graph card for watching temperature and relative humidity delivered by 3 identical Zooz Z-Wave 4-in-1 sensors. The card code is
entities:
- entity: sensor.bathroom_temperature
- entity: sensor.bathroom_relative_humidity
- entity: sensor.kitchen_temperature
- entity: sensor.kitchen_relative_humidity
- entity: sensor.bedroom_temperature
- entity: sensor.bedroom_relative_humidity
hours_to_show: 1
refresh_interval: 0
type: history-graph
That should group the temperature and humidity sensors into graphs, right?
But instead it groups two sensors into graphs, and puts the third sensor into bars… very weird.
any ideas?
tom_l
July 28, 2020, 4:06am
2
Graphs are grouped by unit of measurement. If you have recently changed them they may take a little time to settle down and no longer be shown as bar graphs.
mirekmal
(Mirek Malinowski)
July 28, 2020, 6:41am
3
Also could be that bedroom sensors are returning text rather than number values. Therefore are shown as bars, not charts.
tom_l
July 28, 2020, 8:20am
4
Yes particularly if the unit is part of the state. What does this return in the developer tools template editor:
{{ states('sensor.bedroom_temperature') }}
I have been working on adding this to mini-graph-card.
Here is the PR see if this is what you are looking for
kalkih:dev
← wallbasher:StateHistory
opened 03:31AM - 17 Jan 22 UTC
Added state history graph shown above existing graphs, these have full color sta… te mapping specification.
Adds options to show hour bars every x hours
Somebody asked about doing this over on Reddit: https://www.reddit.com/r/homeassistant/comments/s74845/whats_the_proper_way_to_register_my/
![image](https://user-images.githubusercontent.com/1956918/149703818-39cd679f-b52b-40ca-9dbe-4371f478fa96.png)
```
entities:
- entity: sensor.hvac_temperature
name: HVAC
color: yellow
- entity: sensor.basement_leak_temperature
name: Basement
- entity: sensor.smartthings_motion_temperature
name: Upstairs
- entity: sensor.openweathermap_temperature
name: Outside
color: purple
- entity: sensor.basement_multisensor_temperature
name: Johns Office
- entity: sensor.upstairs_multisensor_temperature_2
name: Master Bedroom
- entity: sensor.hvac_action
name: HVAC Action
style: historyBar
states:
- value: idle
label: 'Off'
color: black
opacity: 0.1
- value: heating
color: '#B71C1C'
label: Heat
- value: cooling
label: Cool
color: '#1A237E'
- value: fan
color: '#1565C0'
label: Fan
- value: unknown
label: Unavailable
color: '#9E9E9E'
hours_to_show: 48
line_width: 3
points_per_hour: 2
refresh_interval: 0
show:
fill: false
labeles_secondary: true
labels: true
show_legend: false
show_line: false
show_points: false
historyGraph:
bar_height: 20
bar_gap: 10
y_axis: secondary
type: custom:mini-graph-card
```
![image](https://user-images.githubusercontent.com/1956918/149703856-eef2eec4-8f17-47c7-b8de-5bd8d4c80fc7.png)
```
entities:
- entity: person.john_weilbacher
style: historyBar
show_legend: false
name: John
states:
- value: home
label: Home
color: '#1b1b1b'
opacity: 0.95
- value: Target
color: '#B71C1C'
label: Target
- value: not_home
label: Out
color: '#1A237E'
- value: The Valley
color: '#1565C0'
label: The Valley
- value: Waterloo
color: '#D84315'
label: Waterloo
- value: Carly's
label: Carly's
color: '#FF9100'
- entity: person.lyndsy_weilbacher
style: historyBar
name: Lyndsy
show_legend: false
states:
- value: home
label: Home
color: '#1b1b1b'
opacity: 0.95
- value: Target
color: '#B71C1C'
label: Target
- value: not_home
label: Out
color: '#1A237E'
- value: The Valley
color: '#1565C0'
label: The Valley
- value: Waterloo
color: '#D84315'
label: Waterloo
- value: Carly's
label: Carly's
color: '#FF9100'
- value: unavailable
label: Unavailable
color: '#9E9E9E'
- entity: lock.front_door
style: historyBar
name: Front Door
show_legend: false
states:
- value: unlocked
label: Unlocked
color: '#880E4F'
- value: locked
label: Locked
color: '#1b1b1b'
opacity: 0.95
- value: unavailable
label: Unavailable
color: '#9E9E9E'
- entity: lock.back_door
style: historyBar
name: Back Door
show_legend: false
states:
- value: unlocked
label: Unlocked
color: '#880E4F'
- value: locked
label: Locked
color: '#1b1b1b'
opacity: 0.95
- value: unavailable
label: Unavailable
color: '#9E9E9E'
- entity: cover.garage_door
style: historyBar
name: Garage
show_legend: false
states:
- value: open
label: Open
color: '#880E4F'
- value: closing
label: Closing
color: '#880E4F'
- value: unavailable
label: Unavailable
color: '#9E9E9E'
- value: opening
label: Opening
color: '#880E4F'
- value: closed
label: Closed
color: '#1b1b1b'
opacity: 0.95
- entity: binary_sensor.basement_leak_moisture
style: historyBar
name: Basement Drain
states:
- value: 'off'
label: Dry
color: '#1b1b1b'
opacity: 0.95
- value: 'on'
label: Leak
color: '#880E4F'
- value: unavailable
label: Unavailable
color: '#880E4F'
- entity: binary_sensor.front_door_motion
style: historyBar
name: Front Door Motion
states:
- value: 'off'
label: None
color: '#1b1b1b'
opacity: 0.95
- value: 'on'
label: Motion
color: '#880E4F'
- entity: binary_sensor.front_door_ding
style: historyBar
name: Doorbell
states:
- value: 'off'
label: None
color: '#1b1b1b'
opacity: 0.95
- value: 'on'
label: Ding
color: '#880E4F'
historyGraph:
bar_height: 15
bar_gap: 5
hours_to_show: 12
line_width: 3
points_per_hour: 12
refresh_interval: 5
lines_every_x_hour: 1
height: 500
fill: false
type: custom:mini-graph-card
```
![image](https://user-images.githubusercontent.com/1956918/149703887-ed6aeeba-08d1-42b9-a968-391683f2ac6d.png)
```
entities:
- entity: binary_sensor.ac
style: historyBar
name: AC
- entity: binary_sensor.coffee_maker
style: historyBar
name: Coffee Maker
- entity: binary_sensor.dishwasher
style: historyBar
name: Dishwasher
- entity: binary_sensor.dryer
style: historyBar
name: Dryer
- entity: binary_sensor.electric_blanket
style: historyBar
name: Heated Blanket
- entity: binary_sensor.furnace_2
style: historyBar
name: Furnace
- entity: binary_sensor.heat_3
style: historyBar
name: Heat
- entity: binary_sensor.heat_5
style: historyBar
name: Heat
- entity: binary_sensor.heat_6
style: historyBar
name: Heat
- entity: binary_sensor.heat_7
style: historyBar
name: Heat
- entity: binary_sensor.heat_8
style: historyBar
name: Heat
- entity: binary_sensor.hot_water_heater_fan
style: historyBar
name: Hot Water Fan
- entity: binary_sensor.microwave
style: historyBar
name: Microwave
- entity: binary_sensor.oven
style: historyBar
name: Oven
- entity: binary_sensor.stove
style: historyBar
name: Stove
- entity: binary_sensor.washer
style: historyBar
name: Washer
- entity: sensor.hvac_action
name: HVAC Action
style: historyBar
- entity: sensor.energy_usage
name: Usage
hours_to_show: 120
line_width: 3
points_per_hour: 0.5
refresh_interval: 0
show:
fill: false
show_legend: false
show_line: true
show_points: false
historyGraph:
bar_height: 10
bar_gap: 2
y_axis: secondary
states:
- value: 'off'
label: 'Off'
color: '#1b1b1b'
opacity: 0.95
- value: 'on'
color: '#B71C1C'
label: 'On'
- value: idle
label: 'Off'
color: '#1b1b1b'
opacity: 0.95
- value: heating
color: '#B71C1C'
label: Heat
- value: cooling
label: Cool
color: '#1A237E'
- value: fan
color: '#1565C0'
label: Fan
- value: unknown
label: Unavailable
color: '#9E9E9E'
type: custom:mini-graph-card
```
ellisx
(Leigh Ellis)
August 9, 2023, 10:55am
6
Adding unit worked for me
this line: unit_of_measurement: “°C”
in this:
temperature_thermostat:
friendly_name: Thermostat Temperature
unit_of_measurement: "°C"
value_template: >-
{{ state_attr('climate.mini','current_temperature')}}