I know it’s possible with automations using a timer and a switch,
but would it be possible to have a timer permanently connected to a switch and make it update the state to the state of a timer?
Use case is automatically turning off lights - turn the switch+timer combo on, it counts down, then finished turn the light off.
I don’t really want to make automation per light and would be much easier to just have an entity that will do it without any other automation.
I’m thinking about how a generic thermostat works - it is able to switch the heating entity by itself without using an automation to say “if thermostat says turn on, turn on the switch” et…
A timer isn’t necessary. Simply use a State Trigger’s for option. One State Trigger can manage multiple switches (i.e. one automation can manage any number of switches and lights).
There a hundreds of examples to do just that on this forum…
I also don’t see the benefit, what difference does it make to set a time delay on an automation or the switch as proposed by you; you still have to set it….
Each light can have a different timeout value; simply create a separate State Trigger for each one with its own for option. The value of for can be an Input Number, allowing you to easily change the value from the UI.
The use-case you described is a common one and, like aceindy explained, there are existing examples available (automations and blueprints).
I know that it can be done with blueprints automations etc and this is how I have it setup right now.
By that logic, the generic thermostat component doesn’t make sense, as this can be done with a temperature sensor, a heater switch and some automations that would watch the sensor and set the switch accordingly.
My point is not to have so many automations and just have the logic integrated in the timer component.
Home Assistant has many platforms and each one models a real-world device. A thermostat is a very common device so that’s why there’s a climate platform with a corresponding Thermostat card. It’s able to represent physical thermostats, like from Ecobee, Honeywell, etc, and virtual thermostats like the Generic Thermostat integration.
If the Generic Thermostat integration didn’t exist then one would have to use a combination of sensor, switch, and automation to replicate its functionality. However, it wouldn’t be a climate platform so it could not use any of its services or be displayed by a Thermostat card. That’s why the Generic Thermostat integration exists (and the Generic Hygrostat for similar reasons).
Anyway, it’s not me you need to convince of your idea’s merits; it needs to attract the attention and interest of a volunteer developer, willing to invest time to implement it. High vote counts attract attention but don’t guarantee implementation (i.e. even Feature Requests with high vote counts aren’t implemented); it all depends if a developer likes the proposal enough to create it and then for the development team to also be convinced it’s a worthwhile addition and allow it to be included in Home Assistant.