You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Jeremy,
I'm facing a strange problem with your lovelace card and I don't know how to solve it, I guess there's some sort of bug with latest software releases. I'll try to describe my situation:
Device: iRobot 965
HomeAssistant v0.112.4
Host; Raspberry Pi, Python Virtual Env. No docker stuff, "production"/home environment, not a test.
HACS installed and up to date, I usually install software with it
iRobot Roomba Integration from HomeAssistant, latest version
in the lovelace: / resources: section
and added the card: custom:roomba-vacuum-card in the interface, as suggested in your MD file here's the basic config:
With this config I get this JS error (from Chrome console)
TypeError: Cannot read property 'attributes' of null (roomba-vacuum-card.js:176)
And this would be reasonable because my entity is named vacuum.tiefighter from the sensors list, this is not a name I've chosen, this is something automatically configured after the pairing (and I cannot change it from the interface without raising "Domain needs to stay the same" error).
So I've made these tests but without success:
# basically wrong because it doesn't exists
entity: sensor.tiefighter
# and from browser console here's the error:
# TypeError: Cannot read property 'attributes' of null (roomba-vacuum-card.js:176)
# basically wrong because it doesn't exists
entity: sensor.vacuum.tiefighter
# and from browser console here's the error:
# TypeError: Cannot read property 'attributes' of null (roomba-vacuum-card.js:176)
# basically wrong because it doesn't exists
entity: tiefighter
# message on screen [card]:
# Please define a sensor entity.
# type: 'custom:roomba-vacuum-card'
# entity: tiefighter
# and from browser console here's the error:
# card custom:roomba-vacuum-card Error: Please define a sensor entity.
# at HTMLElement.setConfig (roomba-vacuum-card.js:365)
This "should" be right but I still get errors
entity: vacuum.tiefighter
# message on screen [card]:
# Please define a sensor entity.
# type: 'custom:roomba-vacuum-card'
# entity: tiefighter
# and from browser console here's the error:
# card custom:roomba-vacuum-card Error: Please define a sensor entity.
# at HTMLElement.setConfig (roomba-vacuum-card.js:365)
So I guess I've covered a lot of different configs.
After some debugging I've found an hack and where the real bug is (or could be).
First of all I've changed the entity check, in my case: vacuum.tiefighter
so I've changed:
if (config.entity.split('.')[0] !== 'sensor') throw new Error('Please define a sensor entity.');
to
if (config.entity.split('.')[0] !== 'vacuum') throw new Error('Please define a sensor entity.');
to avoid that dummy check. after this it works.
This could be the patch:
365c365
< if (config.entity.split('.')[0] !== 'sensor') throw new Error('Please define a sensor entity.');
---
> if (config.entity.split('.')[0] !== 'vacuum') throw new Error('Please define a sensor entity.');
What do you think about it ? (sorry for the long post)
Cheers and thank you for the awesome card
The text was updated successfully, but these errors were encountered:
I have updated this card to support using a vacuum entity now, however this card isn't intended to be used with the HA native integration as i doubt if the attributes will line up correctly?
If you want full support of this card, i would suggest you checking my other repo - ha-rest980-roomba which takes advantage of the rest980 docker image / HA Addon to provide this functionality.
Hi Jeremy,
I'm facing a strange problem with your lovelace card and I don't know how to solve it, I guess there's some sort of bug with latest software releases. I'll try to describe my situation:
Device: iRobot 965
HomeAssistant v0.112.4
Host; Raspberry Pi, Python Virtual Env. No docker stuff, "production"/home environment, not a test.
HACS installed and up to date, I usually install software with it
iRobot Roomba Integration from HomeAssistant, latest version
iRobot Roomba integration found three sensors:
tiefighter
is the name detected from the device itself, I didn't changed the name, just autodetected from HA.Then I've installed your Card (with HACS) and I've altered my yaml files
in the lovelace: / resources: section
and added the card: custom:roomba-vacuum-card in the interface, as suggested in your MD file here's the basic config:
With this config I get this JS error (from Chrome console)
And this would be reasonable because my entity is named vacuum.tiefighter from the sensors list, this is not a name I've chosen, this is something automatically configured after the pairing (and I cannot change it from the interface without raising "Domain needs to stay the same" error).
So I've made these tests but without success:
This "should" be right but I still get errors
So I guess I've covered a lot of different configs.
After some debugging I've found an hack and where the real bug is (or could be).
First of all I've changed the entity check, in my case: vacuum.tiefighter
so I've changed:
to
to avoid that dummy check. after this it works.
This could be the patch:
What do you think about it ?
(sorry for the long post)
Cheers and thank you for the awesome card
The text was updated successfully, but these errors were encountered: