How many hours have I been somewhere (History statistics sensor)

Hi, can anyone help me figure out why this ‘sensor’ isn’t working? I’m trying to see/show how many hours I’ve been at work today.

platform: history_stats
name: Werk
entity_id: device_tracker.iphone
state: 'Werk'
type: time
start: '{{ now().replace(hour=8).replace(minute=0).replace(second=0) }}'
duration:
  hours: 10

Shouldn’t it be state: 'not_home' rather than state: 'Werk'?

Also, this sensor would tell you how long you’ve been away between midnight and 10:00 in the morning, althought that might be intentional.