i am trying to create a sensor via the template platform from the Xiaomi Mi Robot Vacuum Component.
So I can see it in more detail without clicking on it.
As example just start the spot cleaning, no need to first click in the object itself.
So far, I tried this, but it is not getting any status information:
battery_level:
friendly_name: Charging State
value_template: '{{ states.vaccum.eve.attributes["battery level"] }}'
I doubt a dictionary key in home assistant would have an attribute with a space in its name. I could be wrong but that looks off. I would also expect this to work, if battery_level is the correct attribute:
I’m trying to create a template sensor from a motion event triggered by a Doorbird station. The goal is to display the show_last_changed attribute of a motion sensor in a glance card. However, the timestamp of the motion is in the Doorbird event. The doorbird sends an event to HA like:
Event 0 fired 10:29 PM:
{
“event_type”: “doorbird_front_gate_motion”,
“data”: {
“timestamp”: “2019-11-19T06:29:31.868412+00:00”,
“live_video_url”: “http://station_name:[email protected]:80/bha-api/video.cgi”,
“live_image_url”: “http://station_name:[email protected]:80/bha-api/image.cgi”,
“rtsp_live_video_url”: “rtsp://station_name:[email protected]:554/mpeg/media.amp”,
“html5_viewer_url”: “http://station_name:[email protected]:80/bha-api/view.html”
},
“origin”: “LOCAL”,
“time_fired”: “2019-11-19T06:29:31.868702+00:00”,
“context”: {
“id”: “your_doorbird_ID”,
“parent_id”: null,
“user_id”: null
}
I get the following error:
Error loading /config/configuration.yaml: invalid key: “OrderedDict([(‘state_attr(event.doorbird_front_door_motion’, None), (‘timestamp)’, None)])”
in “/config/sensors.yaml”, line 19, column 0