Binary sensor not properly shown
See original GitHub issueI want to graph two different binary sensors, one for a door lock sensor, the other for my heating systeem
Now, using this code
type: 'custom:mini-graph-card'
entities:
- entity: binary_sensor.carajito_active
name: State
color: red
name: Heating
hours_to_show: 24
points_per_hour: 4
aggregate_func: max
line_width: 2
smoothing: false
state_map:
- value: 'off'
label: Waiting
- value: 'on'
label: Heating
I’m just getting a flat line, even though as you can see the sensor assumes on/off values properly
For the door sensor is even weirder, as I’m getting an inverse graph:
type: 'custom:mini-graph-card'
entities:
- entity: binary_sensor.tuya_door_sensor
name: Hold the door!
icon: 'mdi:door-closed'
hours_to_show: 24
points_per_hour: 4
update_interval: 30
aggregate_func: max
line_width: 2
smoothing: false
state_map:
- value: 'on'
label: Mooooar
- value: 'off'
label: Bravo Hodor!
So the values are exactly the opposite value.
Any hint?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:11 (2 by maintainers)
Top Results From Across the Web
Binary sensor not showing up - Home Assistant Community
I am tinkering with Home-Assistant for some month now. I upgraded from a raspi 3 to a virtual machine on proxmox now the...
Read more >How to create a new binary sensor? : r/homeassistant - Reddit
Is there anything I am doing wrong that would cause the new binary sensor to show as "closed". r/homeassistant - How to create...
Read more >Pedestrian counting with grid-based binary sensors ... - NCBI
Abstract. In this paper, we propose a method for estimating the number of pedestrians walking in opposite directions, as in cases of a...
Read more >Konnected not updating status of HA binary_sensors
I have just installed Home Assistant v0.7.0 and it successfully discovers my Konnected and pulls through all the binary sensors and switches I've...
Read more >Configuring binary sensors and template switches in Home ...
This video is a tutorial on how to configure binary sensors and template switches in Home Assistant Here are a couple of links...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I did it like this and works. The binary_sensor.isNight provides true and false, but if i use state_map with this, it won’t work. It seems “off” and “on” does the trick, but don’t ask me why
Thanks for the info. I reckoned there was a caching issue, because after a day or so there would be at least “wrong” results meaning the graph was inverted or something similar.
No, the issue didn’t resolve itself. My solution was to create a template value sensor in HA which translates the binary “on”/“off” or whatever to numeric 0/1 and use this numeric value instead on the secondary axis.
This gives me the desired result
The gray shadow in the background shows whether the the thermostat is in “eco” or “comfort” mode and the orange line shows the current temperature of the room.