Add custom entity to Shelly device

Hey all,

I have a flexible tarif where the energy prices change every hour. I would like to control my pool pump according to the cheapest times :slight_smile: so I connected my pool pump via Shelly, and it is integrated in Home Assistant. For my automation I would like to add a parameter of how many hours per day, the pump shall run.

Is there some possibility to add an entity to the Shelly device where I can enter this value?

Thank you in advance!

Best regards,
Mario

Just like a static value that you can use in templates and conditions?

You can add any attribute you like to an entity (not a device) using the customize section in YAML config:

customize:
  sensor.my_shelly_switch:
    my_run_limit: 60  # 1 hour, if minutes 

You can access this value with the state_attr template function.