This is dead easy to do in Home Assistant if you use a jinja-based template as the automation trigger.
Any template that will evaluate to true will trigger the automation. Templates are re-evaluated every time the state of the object changes or (if you use a time function, or don't reference any objects) every minute.
Here's a simple example that would send a notification if I left my kitchen LEDs on 200 brightness or more for longer than two hours.
alias: Kitchen
description: ''
trigger:
- platform: template
value_template: ' {{ state_attr('light.kitchen_led', 'brightness')|int >= 200 and as_timestamp(states.light.kitchen_led.last_updated) + 3600 < as_timestamp(now()) }} '
condition: []
action:
- service: notify.my_phone
data:
title: Kitchen lights still on
message: The kitchen LEDs have been on very bright for more than 2 hours.
mode: single