Custom timed event entity state please help

Hi, I’m new to Home Assistant; barely a few days and am blown away by the framework and integration this tool offers. However i’m at a sticking point and wondered if anyone would be so kind to help.

I basically am wanting to set the state of a new entity I created based on a time event, ideally 2 times each day. however in this example have used just one time event until I understand the basics.

1)The entity doesn’t exist as there’s no integration at current hence created a dummy entity by opening states and manually typing in the entity name blinds.test , then setting the state to open.

  1. I then edited the configuration.saml and added the line automation: !include automations.yaml

  2. I then selected automation and created a simple routine to update the entity state to closed.
    This created the following code in my automations.yaml file.

- id: '1557867311208'
alias: Blinds
trigger:
- at: '22:25:00'
platform: time
action:
entity_id: blinds.side
state: 'Closed'

I then checked validated the config and restarted the server.

The first thing I noticed was that my Entity had vanished after the restart, therefore recreated the blinds.test again manually. however when the time reached 19:30 the entity state remained as ‘Open’ and not ‘Closed’ as I expected.

I’ve obviously missed a few steps or gone about the the wrong way, would really appreciate if someone could please explain how this should be done.

Thank you in advance.

Please edit your post and format your pasted code correctly. Point 11: How to help us help you - or How to ask a good question

1 Like

Have another go at formatting your code. You appear to have only quoted it which does not preserve indentation, and this is important in YAML.

1 Like

Yes, you are going about this the wrong way. You should start with an integration/component. Components create entities. There is no instance in HA where you create an entity through an automation. They are all done through some type of component.

Thanks for the clarity Petro,

I knew they could be created manually as i’ve return the state to my dashboard.
unfortunately the device I own doesn’t have a component and uses time events in the app.
simply wanted to mimic the time and create a dummy entity.

Good to know now it is not possible as was struggling to get it to work :slight_smile:

There’s other ways. What does the device do? On/ off at specific times?

That’s basically all it does, It was more to create awareness on the dashboard if the device was on or off although not guaranteed to be in sync due to no actual integration.

If there’s a way to do this it would be really appreciated.

Thanks

Yeah, just use input_boolean and use the automation to turn that on and off

Thanks Petro :+1: