Adding 3rd-party devices, or automating non-devices

Hi. I have phillips hue lights (officially supported), and Tuya/Smart-Life sockets (3rd-party). I configured the latter with this in my configuration:

tuya:
  username: "my_username"
  password: !secret smart_life_password
  country_code: "1"
  platform: "smart_life"

Only the Hue lights show up as devices (ie configuration -> Devices, and); the switches show on the main page and work, but are not available for automations, as they’re not registered as devices in the system. How would you fix this? Ie turn them into devices, or automate them without doing so? They are registering as entitys.

You can automate without them being devices.

How do I do this? I don’t see anything appropriate in Trigger type.

You use the entity. Plenty of examples on the forum. The device trigger is a new addition to HA, only available since a few iterations in HA, before we had to do everything without the device trigger.

I’m unable to find this via a search or docs. This is the closest I can piece together, but it doesn’t work:

Automations.yaml

- id: '1576672802985'
  alias: Pump on
  description: ''
  trigger:
  - hours: '5'
    platform: time_pattern
  condition: []
  action:
  - service: switch.turn_on
    entity_id: switch.31110200bcddc2abd56e

??

you need to be a bit more specific.

By doesn’t work, I mean the devices don’t turn on and off at the specified times.

I think I’ve found the problem: I must restart the server (Configuration -> Server Controls -> Restart) for changes to take effect. Is this intended behavior?

Yes

You could just restart AUTOMATIONS. You don’t have to restart the entire server.

What is more it is documented so.