Comments (7)
Well, thats unusual, as you do indeed have the correct attributes that the template is looking for.
Can you try copying the text (might need formatting) and test it in the dev/tools templates section and see what happens?
{% if state_attr('sensor.rest980', 'cleanMissionStatus')['cycle'] == 'none' and state_attr('sensor.rest980', 'cleanMissionStatus')['notReady'] == 39 %} Pending {% elif state_attr('sensor.rest980', 'cleanMissionStatus')['notReady'] > 0 %} Not Ready {% else %} {% set mapper = { 'clean' : 'Clean', 'quick' : 'Clean', 'spot' : 'Spot', 'evac' : 'Empty', 'dock' : 'Dock', 'train' : 'Train', 'none' : 'Ready' } %} {% set state = state_attr('sensor.rest980', 'cleanMissionStatus')['cycle'] %} {{ mapper[state] if state in mapper else state }} {% endif %}
from ha-rest980-roomba.
jinja2.exceptions.UndefinedError: 'None' has no attribute 'notReady'
Do you have sensor.rest980 showing in the Developer Tools / States? Does this have a cleanMissionStatus section?
from ha-rest980-roomba.
Yes, there is a showing a sensor.rest980 and it has the following state attributes:
batPct: 100
bin:
present: true
full: true
cleanMissionStatus:
cycle: none
phase: charge
expireM: 0
rechrgM: 0
error: 0
notReady: 0
mssnM: 0
expireTm: 0
rechrgTm: 0
mssnStrtTm: 1625140454
initiator: rmtApp
nMssn: 271
dock:
known: true
pn: null
state: null
id: null
fwVer: null
pose:
theta: 0
point:
x: 0
'y': 0
signal:
rssi: -55
snr: 29
noise: -84
bbmssn:
aCycleM: 56
nMssnF: 22
nMssnC: 85
nMssnOk: 164
aMssnM: 59
nMssn: 271
bbrun:
nOvertemps: 0
nEvacs: 0
nCBump: 0
nWStll: 2
nMBStll: 141
nPanics: 264
nPicks: 259
nOpticalDD: 82
nPiezoDD: 81
nScrubs: 175
nStuck: 23
sqft: 265
min: 10
hr: 87
nCliffsF: 8679
nCliffsR: 0
name: Roomba
pmaps:
- QufJjQ3JS0O8iEkr0Mw0cA: 210701T122502
- 3GzOUb6kRdWWaVH_nUm1XA: 210127T154034
- NQAhRS4LTyCaDwKzO0yj3Q: 210619T153126
- 8fkS_BkyQoaygPZeOWJYbQ: 210127T165007
- JWY4wIN9RTu2rJV_U40N4w: 210507T095652
- 4UVhEzgZQS6uDMMriootGg: 210223T132437
friendly_name: rest980
so yes, there is a cleanMissionStatus.
from ha-rest980-roomba.
Result type: String
Ready
This template listens for the following state changed events:
Entity: sensor.rest980
from ha-rest980-roomba.
Ok so, do you see this during bootup only? I believe its just due to the rest980 data not being ready and it clears itself up after its loaded.
from ha-rest980-roomba.
bump
from ha-rest980-roomba.
Got the same error. Compared to your sample few messages earlier ☝ the vacuum.yaml got 2 extra spaces. Not sure if those made any difference. Didn't test. At least dev tools template renderer won't mind those.
I removed those and now it works for me. Could be also something else I simply missed...
from ha-rest980-roomba.
Related Issues (20)
- Config Error HOT 3
- more than 2+ roombas? HOT 2
- Connection refused when adding integration. HOT 1
- Buttom to clean a static specific room outside lovelace HOT 1
- log stays empty HOT 3
- Selective Room Payload Error HOT 1
- error on connect to get details of robot HOT 4
- Error in Template HOT 3
- Error installing, does this support the i8+? HOT 2
- Error At step 2 getting the roomba config HOT 1
- Getting Error in my rest980 docker container HOT 1
- php docker image issues
- how to control roomba via automation now HOT 1
- Errors trying to connect and get password. HOT 2
- REST980 `/api/local/info/state` response doesn't contain `location` HOT 1
- couple of questions about handling mulitple roomba's HOT 3
- Adding mopping feature to J7+ HOT 5
- roomba-vacuum-card isn't displayed anymore after update to Home Assistant OS 12.0 HOT 1
- Card buttons stopped responding HOT 8
- There seems to be errors for this integration with HA 2024.6+ HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ha-rest980-roomba.