ShellyForHass custom component

I was talking about the wifi signal, perhaps there are a number of wifi message retransmissions causing the delay.

It is more likely that the delays is because CoAP not working so it polling the devices for status. There is a attribute “protocols” on the entity. If it shows coap-msg the CoAP status update is working.

1 Like

I believe the issue in my case is related to CoAP. While changing my wifi router configuration for IGMP seemed to allow some traffic from the shelly switches to the broadcast address (as seen using tcpdump_ it never really got to the point that the status was working without polling. As I really only care about the on and off condition switching to using MQTT ended up being the best option with my current wifi router. Thanks for the input.

How do you install it?!

TLDR; Sorry for my ignorance, what’s the reason for not integrating this into HA?

My main issue is it keeps renaming my entities after I change them in the GUI. If I set the name in YAML with entity_id, it will change every entity of that device but I want the names to be different.

I have a light switch that is wired to my entertainment center outlet. That physical switch was taped in the on position for a long time until I wired a shelly switch to it.

Now, I want the physical switch connected that shelly to control the couch lights via automation and be named binary_sensor.couch_lights.

But I want the power flowing through the shelly to be named sensor.family_room_media_power.

I’ve renamed them multiple times and after reboot the power entity of all my shelly’s get renamed back to default.

With the new update to 0.110 I get the error message below in the log.
I think it has something to do with renaming entity class names

Renamed entity class names

Logger: homeassistant.components.light
Source: components/light/__init__.py:280
Integration: Licht (documentation, issues)
First occurred: 15:18:36 (3 occurrences)
Last logged: 15:18:36

Light is deprecated, modify ShellyLightRelay to extend LightEntity
Light is deprecated, modify ShellyDimmer to extend LightEntity
Light is deprecated, modify ShellyRGB to extend LightEntity
Logboekdetails (WARNING)
Logger: homeassistant.components.switch
Source: components/switch/__init__.py:73
Integration: Schakelaar (documentation, issues)
First occurred: 15:18:37 (2 occurrences)
Last logged: 15:18:37

SwitchDevice is deprecated, modify ShellySwitch to extend SwitchEntity
SwitchDevice is deprecated, modify ShellyFirmwareUpdate to extend SwitchEntity
Logboekdetails (WARNING)
Logger: homeassistant.components.binary_sensor
Source: components/binary_sensor/__init__.py:139
Integration: Binaire sensor (documentation, issues)
First occurred: 15:18:37 (3 occurrences)
Last logged: 15:18:37

BinarySensorDevice is deprecated, modify ShellySwitch to extend BinarySensorEntity
BinarySensorDevice is deprecated, modify ShellyBinarySensor to extend BinarySensorEntity
BinarySensorDevice is deprecated, modify ShellyBinaryInfoSensor to extend BinarySensorEntity

Edit: Installing the beta solved this.

Great job I was almost the same Lovelace config than you. Just looking for a way to control the W LEDs. thanks so much :smiley:

This is my latest config:
slika

Benefits - seeing also the power consumption + 1 click to enable/disable light


entities:
  - light.shelly_rgbw2_dnevna
  - sensor.shelly_rgbw2_dnevna_current_consumption
  - entity: sensor.variable_obvestilo_rgbw2_white
  - attribute: white_value
    entity: light.shelly_rgbw2_dnevna
    full_row: true
    step: 1
    type: 'custom:slider-entity-row'
  - entity: sensor.variable_obvestilo_rgbw2_color
  - entity: light.shelly_rgbw2_dnevna
    full_row: true
    step: 1
    type: 'custom:slider-entity-row'
  - colors:
      - brightness: 1
        effect: 0
        icon_color: '#c0c0c0'
        rgb_color:
          - 255
          - 255
          - 255
        transition: 1
        white_value: 220
      - brightness: 220
        effect: 0
        icon_color: '#990000'
        rgb_color:
          - 255
          - 0
          - 0
        transition: 1
        white_value: 0
      - brightness: 220
        effect: 0
        icon_color: '#009900'
        rgb_color:
          - 0
          - 255
          - 0
        transition: 1
        white_value: 0
      - brightness: 220
        effect: 0
        icon_color: '#999900'
        rgb_color:
          - 255
          - 255
          - 0
        transition: 1
        white_value: 0
      - brightness: 220
        effect: 0
        icon_color: '#009999'
        rgb_color:
          - 0
          - 255
          - 255
        transition: 1
        white_value: 0
      - brightness: 220
        effect: 2
        icon_color: center/120% url('/local/images/rainbow.png')
        transition: 1
        white_value: 0
      - brightness: 1
        effect: 0
        icon_color: center/95% url('/local/images/night_mode.png')
        transition: 1
        white_value: 3
    entity: light.shelly_rgbw2_mqtt_dnevna
    justify: between
    type: 'custom:rgb-light-card'
show_header_toggle: false
title: LED trak
type: entities
1 Like

I’m having the same issue with update 0.111.0

Confirm. I’m running 0.111.2 but I’m received same messages

Hello everyone,

I’m having trouble getting the ShellyForHass integration to work. Somehow my devices do not show up. I have configured the integration with GUI and I have tried to do it within the configuration.yaml. But without any results.

Im flying blind at the moment because I have no clue what is going.

I do have Mosquitto broker running for a few ESPhome sensor. Could it be that is interfering with the ShellyForHass integration and the auto discovery of shell sensors?

Hopefully someone can point me in the right direction!

Hello i need your help.

I have shelly 1, pm, Em plugs etc

i install hacs and shellyforhass.

i have a problem, i make a card but when switch on a light the icon not change de color.

And i have this erros at log file

Light is deprecated, modify ShellyLightRelay to extend LightEntity
SwitchDevice is deprecated, modify ShellySwitch to extend SwitchEntity
Error connect cloud, nonnumeric port: ’ shelly-9-eu.shelly.cloud’
Error update cloud, local variable ‘conn’ referenced before assignment

HI, I’m also having trouble discovering shelly dimmer 2 devices, although all shelly 2.5 devices were discovered fine.

ShellyForHass doesn’t use mqtt.
To Use mqtt integration you need to configure manually lights, switches sensors - whatever tou have - in configuration.yaml
You can use Shelly autodiscovery script which might be helpfull at the beginning. but since it uses built-in mqtt autodiscovery, this way has a lot limitations in further entities maintenance comparing to editing yaml

which firmware version? Recent dimmmer fw versions have breaking changes making ShellyForHass not working with its HA integration. Downgrade fw to v1.7.x or wait for integration update. or start using mqtt

Thanks a lot @maxym, actually I started using mqtt. However, now I’ve seen that with 0.115 HA, shellyforhass seems fully integrated, although I didn’t try it out yet.

Hello,
i am fairly new on HA and want to use shellyforhass for a shelly bulb duo.
The device is found and i can switch it on/off and change light intensity.
The color temperature is on the secondary info and i can move the slider, but the device stays yellow, no matter where i put the slider. It changes to blueish light only if i put the slider on the very left.
I already removed the adaptive lightning integration i installed in hacs - no change so far.

Second prolem: the UI elements dont show the states of the bulb. For few seconds per minute it shows the on state, the other around 60 sec its shown as off. The intensity slider also looks like off.
In the secondaty info page sometimes teh color temp slider is shown, sometimes it disappeared and reappeared i dont know why.
I tried the light dimmer card, the button card and some custom cards , they all behave the same.
Any ideas?

I dont use MQTT for this.

Resetting the device doesnt change anything
shelly switch

Hi,

The documentation states that it is possible to build automations that are triggered by switches, https://github.com/StyraHem/ShellyForHASS#shelly_switch_click

What is needed to get this running? I have the following automation but it doesn’t fire.

- id: '1602840201369'
  alias: Shelly switch
  description: ''
  trigger:
  - platform: event
    event_type: shelly_switch_click
    event_data:
      entity_id: light.shelly_fonster
      click_cnt: 2
      state: false
  condition: []
  action:
  - service: persistent_notification.create
    data:
      message: Shelly switch
  mode: single