СМ
Size: a a a
СМ
O
AS
O
AS
I
I
O
I
ДЦ
SB
Р
platform: template
sensors:
last_motion:
friendly_name: “Last motion date-time”
value_template: >-
{{(as_timestamp(now()) - states.binary_sensor.motion_sensor_xxxxxxxxxxx.attributes[‘No motion since’] | int) | timestamp_custom(’%Y-%m-%d %H:%M’)}}
O
SB
O
SB
ДЦ
platform: template
sensors:
last_motion:
friendly_name: “Last motion date-time”
value_template: >-
{{(as_timestamp(now()) - states.binary_sensor.motion_sensor_xxxxxxxxxxx.attributes[‘No motion since’] | int) | timestamp_custom(’%Y-%m-%d %H:%M’)}}
O
If you want the time the actual state was last changed, then use last_changed instead of last_updated.Спасибо! А я что-то и не знал, что их два, когда-то один попробовал и из-за смены даты-времени из-за сметы атттрибута отказался.