I have the same problem:
binary_sensor:
- platform: template
sensors:
bedroom_movement:
friendly_name: Bedroom Movement
value_template: '{{(as_timestamp(now()) - as_timestamp(states.binary_sensor.bedroom_motion.last_changed) < 1800)}}'
sensor_class: motion
Template renders fine and gives the expected result - however the sensor does not reflect that. It always stays On