Git Product home page Git Product logo

Comments (7)

jeremywillans avatar jeremywillans commented on August 12, 2024 1

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.

jeremywillans avatar jeremywillans commented on August 12, 2024

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.

Wolk9 avatar Wolk9 commented on August 12, 2024

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.

Wolk9 avatar Wolk9 commented on August 12, 2024

Result type: String

Ready

This template listens for the following state changed events:

Entity: sensor.rest980

from ha-rest980-roomba.

jeremywillans avatar jeremywillans commented on August 12, 2024

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.

jeremywillans avatar jeremywillans commented on August 12, 2024

bump

from ha-rest980-roomba.

henripalmroth avatar henripalmroth commented on August 12, 2024

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...

image

from ha-rest980-roomba.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.