Shelly integration enhancement - import relays as lights and expose input toggle

Very excited about new Shelly built in integration in an epic .115 release.

A couple of features would make it much more useful

The most important one is being able to import relays as lights instead of switches.

And the second is to be able to use see if the input value changes on detached button type. This is used to keep power connected to smart bulbs, and the switch toggle change input value, which we can then use to trigger smart bulb action.

I mis tagged this originally, post belongs under feature requests.

Then I vote for this feature request!

For now, as a workaround, you can manually define the Lights entities based on the Switches, Here is an example for shelly 2.5:

light:
  - platform: switch
    name: shelly_shsw_25_xxxxxx_1          # I think that this name is even backwards compatible with ShellyForHASS
    entity_id: switch.shellyswitch25_xxxxxx_relay_0
  - platform: switch
    name: shelly_shsw_25_xxxxxx_2
    entity_id: switch.shellyswitch25_xxxxxx_relay_1

I agree with exposing the physical switch input. You listed my exact use case (for half of my Shelly 2.5) which requires this

1 Like

Just came here to open the same post.

The switch/light is something I could live with and there is a workaround as you said, but the state of the relay when working in ‘Detached’ mode is very useful.

I wanted to get rid of MQTT integration but with that feature missing I had to bring it back again.

I agree with both.

Use the input values of the products is the most important for me. Setting it as a switch or light should be configurable per entity.

I cannot use my i3 (https://shelly.cloud/knowledge-base/devices/shelly-i3/) switches with this interface yet.

I subscribe too!

Does anybody try the workaround proposed by @maor?
It doesn’t work for me… :cry:

Hi all

I am new to Home assistant and have had a friend help me with the more advanced setting.

I have just install the new update and added all my Shelly’s to the new integration enhancement removing them out of mqtt and turned off mqtt in each shelly.

Auto discover found them all and have renamed l and added them at first all went well but after a few hours most of them become unavailable randomly.

From my understanding when using mqtt the device send out a heartbeat to keep them available for HA I am guessing the new integration does not do this or is the a setting I am missing. At all times I can log into the shelly and if I restart HA thy all become available again and then slowly start becoming unavailable.

Has anyone had this problem ?

I have one that has a similar issue. I can connect to it using the shelly cloud or local ip. It’s a bit slow because it has a poor wifi connection. More a bug than a feature enhancement. already reported here: https://github.com/home-assistant/core/issues/40411

The solution proposed by @maor works for me: I have the shelly as light in Home Assistant

1 Like

In 0.118 this is suppouse to be integrated:

Shelly devices configured with new (fw >= 1.9) property “appliance_type” can now be added to the light domain instead of the switch domain.

But I am running a shelly 1 with latest firmware (1.8.3), so it is not possible for me to add this device as a light instead of a switch?

Firmware 1.9 does not seem to be available yet.

Firmware 1.9 is available, I’ve just updated my Shelly 1’s. After the update there is a text box for Appliance Type in the setting menu - I entered Light. After, I deleted the device from the integrations page in home assistant and added it again - the entity is now in the light domain.

2 Likes

Thanks for the notice.

I have been searching but found nothing. Do you know what other values as “Light” does it accepts?

Any value is accepted but if you want HA to use light platform for relay you have to set appliance_type to light`.

Ok, so Firmware 1.9 lets us treat them as lights vs. switches, but how to I get the Shelly Integration to see the state of the shelly “SW” switch input? I need to know if the physical switch is ON so I can then turn ON the Shelly and take it transparent or non-responsive to any automations running. Then when the physical switch is OFF, automations may once again act on the Shelly.

Switch inputs are coming soon i think.

hello everyone.
i tried to integrate two shelly i3´s today and i don´t know if i am just too confused about everything but after integration this afternoon i saw 7entities per i3. right now i only see 4 (cloud/firmware/rssi/uptime) all the inputs are missing. might be the update i did. tried to go back a snapshot but could not get back to 7 again. anyone else with this issue here?

If the switches are momentary, input entities will not be created, you can use input events instead.

Thank you for the quick reply. They were momentary all the time though. Didn’t switch to toggle.

I think i found my way now. I subscribed to shelly.click and got what i need to move on.