Robbrad
(Rob)
1
Can anyone tell me if its possible to grab a value from a entity for use as a sensor value in the front end
eg I have image_processing.openalpr_frontfloodlight
and its attribute data is
plates: {
“XXXXXXX”: 92.68645477294922
}
vehicles: 1
friendly_name: OpenAlpr frontfloodlight
device_class: alpr
Id like to somehow log the plates its detecting for security
gpbenton
(Graham)
2
I think the template sensor is what you are looking for
Robbrad
(Rob)
3
Doesn’t that only work with sensors?
Image processing doesn’t present as a sensor
RobDYI
4
what does this give? or what does it say on the state page?
1 Like
Robbrad
(Rob)
5
Got a JSON with the registration!
Nice, so is that how I access the data?
RobDYI
6
try on of these to get the json data
- platform: template
sensors:
date:
friendly_name: 'Date'
value_template: '{{ states.sensor.json_time.attributes["date"] }}'
milliseconds:
friendly_name: 'milliseconds'
value_template: '{{ states.sensor.json_time.attributes["milliseconds_since_epoch"] }}'
1 Like