check-button-card
check-button-card copied to clipboard
Entity does not exists & less than 1 undefined
Heho. I have two problems.
type: 'custom:vertical-stack-in-card'
cards:
- entity: vacuum.kartoffelsauger
type: 'custom:vacuum-card'
image: default
compact_view: false
- type: 'custom:check-button-card'
title: Filter reinigen
entity: sensor.kartoffelsauger_filter_cleanup
color: Green
width: 50%
text: day(s)
severity:
- value: 3 days
color: Yellow
- value: 7 days
color: Red
- type: 'custom:check-button-card'
title: Filter austauschen
entity: sensor.kartoffelsauger_filter_replace
color: Green
width: 50%
text: day(s)
severity:
- value: 50 days
color: Yellow
- value: 60 days
color: Red
- type: 'custom:check-button-card'
title: Vordere Rolle reinigen
entity: sensor.kartoffelsauger_frontroll_cleanup
color: Green
width: 50%
text: day(s)
severity:
- value: 12 days
color: Yellow
- value: 14 days
color: Red
- type: 'custom:check-button-card'
title: Vordere Rolle tauschen
entity: sensor.kartoffelsauger_frontroll_replace
color: Green
width: 50%
text: day(s)
severity:
- value: 10 months
color: Yellow
- value: 12 months
color: Red
- type: 'custom:check-button-card'
title: Sensoren reinigen
entity: sensor.kartoffelsauger_sensor_cleanup
color: Green
width: 50%
text: day(s)
severity:
- value: 25 days
color: Yellow
- value: 30 days
color: Red
- type: 'custom:check-button-card'
title: Aufnahmerollen reinigen
entity: sensor.kartoffelsauger_cleanuprolls_cleanup
color: Green
width: 50%
text: day(s)
severity:
- value: 75 days
color: Yellow
- value: 90 days
color: Red
- type: 'custom:check-button-card'
title: Aufnahmerollen ersetzen
entity: sensor.kartoffelsauger_cleanuprolls_replace
color: Green
width: 50%
text: day(s)
severity:
- value: 8 months
color: Yellow
- value: 9 months
color: Red
The first one is the creation of Entities. The entered sensor entities does not exists thats correct, then I click on "Create" and the bar becomes green, but after a reload its blue with this message again.
What can I do against this?
The second problem is that the text shows "less than 1 undefined" even after I entered the "text" value. Is this problem related to the first?
Greetings Marco
I am having the same exact issue. It appears that an MQTT entry is created, however, the time stamp is invalid. This is my config
type: 'custom:check-button-card'
title: Brushes
entity: sensor.naomi_brushes
text: month(s)
color: Green
severity:
- value: 6 months
color: Red
- value: 4 months
color: Yellow
This is the corresponding MQTT data that is sent when I click the button
{
"timestamp_friendly":"Invalid Date",
"severity":[
{
"value":"6 months",
"color":"Red",
"seconds":15778476
},
{
"value":"4 months",
"color":"Yellow",
"seconds":10518984
}
]
}
Any suggestions?
@DunklerPhoenix Since things don't appear to be very active around here... Might I suggest that you somehow redue the number of potatoes that need sucking up? This would eliminate your problem by removing the need to monitor your Kartoffelsauger.
Any update on this? This worked fine for a couple of days, now I have the exact same issue. The payload is send correctly to mqtt, but for some reason homeassistant can't read these anymore.
This is my mqtt payload: {"timestamp":1618644019,"timestamp_friendly":"4/17/2021, 9:20:19 AM","severity":[{"value":"4 days","color":"Red","seconds":345600},{"value":"2 days","color":"Orange","seconds":172800}]}
edit: I've found out that he does this after every hass restart.
edit2: The solution was to add discovery to mqtt. So I've used the mqtt integration, and added this to my configuration.yaml
mqtt:
discovery: true
Had the same issue. All i had to do, was just click on it to give it a timestamp to compare with. I assume when you create it, that the timestamp is undefined, hence the error
This also happens if your mqtt server does not have persistence, e.g. data is lost after restarts, basically mimicking the problem above, but no way to fix it without deleting the entity in HA first.