joshjcarrier / homeassistant-litter-robot

The litter-robot component offers integration with the Litter-Robot WiFi enabled devices to Home Assistant.
81 stars 15 forks source link

Litter robot Last seen date in HA does not match the Whisker app #50

Open Waank1 opened 11 months ago

Waank1 commented 11 months ago

When my cat uses the robot, the Last Seen sensor automatically updates on the Whisker app, The one from the api in Home Assistant is always wrong. Wondering if anyone else has had the same problem and is there a 'fix'?

axolotls666 commented 11 months ago

When my cat uses the robot, the Last Seen sensor automatically updates on the Whisker app, The one from the api in Home Assistant is always wrong. Wondering if anyone else has had the same problem and is there a 'fix'?

Last Seen doesn't work in my HA. I use the "Status Code" entity and when it changes to "Cat Sensor Timing" that matches the app time.

Waank1 commented 11 months ago

Thanks [axolotls666], I'm not really sure how to do that, do you make a template sensor?

axolotls666 commented 11 months ago

Thanks [axolotls666], I'm not really sure how to do that, do you make a template sensor?

No. Just look for the state. "cst" means the cat is in getting in the litter robot (or at least touching it).

trigger:

then add your condition and/or action after. This is in my automation.

Waank1 commented 11 months ago

Thanks! using cst I was able to write the following: Now the new sensor Cat Poop Time matches that in the Whisker app.

  - trigger:
      - platform: state
        entity_id: sensor.kitty_shitty_status_code
        to: 'cst'
    sensor:
      - name: Cat Poop Time
        state: "{{ now().timestamp() | timestamp_custom('%A, %B %d at %H%M') }} "  
flyize commented 11 months ago

FYI, I'm guessing the last seen is the HA attribute. It exists for everything in the HA ecosystem and is updated whenever the device sends an update.

Waank1 commented 11 months ago

Flyize, it seems that way, maybe the owner can look into it. I was glad to find a work-around but some may not want to have to do it that way.