anotherjulien / MyHOME

MyHOME integration for Home-Assistant
GNU Affero General Public License v3.0
137 stars 57 forks source link

Platform error light.myhome - cannot import name 'Light' from 'homeassistant.components.light' #48

Open CasaPetrillo opened 2 years ago

CasaPetrillo commented 2 years ago

HI @anotherjulien ! After the last updates of HA (core: 2022.2.9, supervisor: 2022.01.1) I can't control my light. As you can see the covers works correctly but the lights none.

I have these errors:

Logger: homeassistant.components.hassio Source: components/hassio/init.py:598 Integration: Home Assistant Supervisor (documentation, issues) First occurred: 11:25:11 (1 occurrences) Last logged: 11:25:11

The system cannot restart because the configuration is not valid: Platform error light.myhome - cannot import name 'Light' from 'homeassistant.components.light' (/usr/src/homeassistant/homeassistant/components/light/init.py)

Logger: custom_components.myhome Source: custom_components/myhome/gateway.py:234 Integration: MyHome (documentation) First occurred: 23 febbraio 2022, 23:18:10 (39 occurrences) Last logged: 10:37:10

Unknown device: WHO=1 WHERE=16 Unknown device: WHO=1 WHERE=11 Unknown device: WHO=1 WHERE=12 Unknown device: WHO=1 WHERE=13 Unknown device: WHO=1 WHERE=14

Logger: homeassistant.helpers.service Source: helpers/service.py:130 First occurred: 01:00:00 (5 occurrences) Last logged: 10:42:29

Unable to find referenced entities light.luce_bagno_grande, light.luce_bagno_piccolo, light.luce_cabina_armadio, light.luce_camera_matrimoniale, light.luce_cameretta, light.luce_corridoio, light.luce_cucina, light.luce_specchio, light.luce_terrazzo_cucina, light.luce_terrazzo_sala, light.zona_2_luce_4, light.zona_2_luce_5, light.zona_2_luce_6 Unable to find referenced entities light.luce_cabina_armadio Unable to find referenced entities light.zona_2_luce_5 Unable to find referenced entities light.zona_2_luce_6 Unable to find referenced entities light.zona_2_luce_4

Can you help me? How can I resolve?

Thank you for all your work!!

Schermata 2022-02-24 alle 11 52 26 Schermata 2022-02-24 alle 11 53 03 Schermata 2022-02-24 alle 11 53 54 Schermata 2022-02-24 alle 11 54 20

CasaPetrillo commented 2 years ago

@anotherjulien can you help me?

anotherjulien commented 2 years ago

Can you share the relevant part of your configuration?

CasaPetrillo commented 2 years ago

Can you share the relevant part of your configuration?

What do you mean with "the relevant part"?

anotherjulien commented 2 years ago

The part that is about your MyHome lights

CasaPetrillo commented 2 years ago

Here's what you asked me! Thanks for your help

# BTicino MyHome
light:                            #LUCI
  - platform: myhome
    devices:

      luce_sala_1: #FARETTI CENTRALI
        where: "24"
        name: Faretti centrali
        manufacturer: BTicino

      luce_sala_2: #FARETTI INGRESSO
        where: "25"
        name: Faretti ingresso
        manufacturer: BTicino

      luce_sala_3: #FARETTI LATO DIVANO
        where: "26"
        name: Faretti divano
        manufacturer: BTicino

      luce_terrazzo_sala: #TERRAZZO SALA
        where: "27"
        name: Luce terrazzo sala
        manufacturer: BTicino

      luce_corridoio: #CORRIDOIO
        where: "21"
        name: Corridoio
        manufacturer: BTicino

      luce_cucina: #CUCINA
        where: "22"
        name: Luce cucina
        manufacturer: BTicino

      luce_terrazzo_cucina: #TERRAZZO CUCINA
        where: "23"
        name: Luce terrazzo cucina
        manufacturer: BTicino

      luce_cameretta: #CAMERETTA
        where: "11"
        name: Luce cameretta
        manufacturer: BTicino

      luce_cabina_armadio: #CABINA ARMADIO
        where: "12"
        name: Luce cabina armadio
        manufacturer: BTicino

      luce_camera_matrimoniale: #CAMERA MATRIMONIALE 
        where: "16"
        name: Luce camera matrimoniale
        manufacturer: BTicino

      luce_bagno_grande: #BAGNO GRANDE
        where: "14"
        name: Luce bagno grande
        manufacturer: BTicino

      luce_specchio: #SPECCHIO
        where: "15"
        name: Luce specchio
        manufacturer: BTicino

      luce_bagno_piccolo: #BAGNO PICCOLO
        where: "13"
        name: Luce bagno piccolo
        manufacturer: BTicino
        #ASPIRATORE

      aspiratore_bagno_piccolo: #ASPIRATORE BAGNO PICCOLO
        where: "17"
        name: Aspiratore bagno piccolo
        manufacturer: BTicino
anotherjulien commented 2 years ago

Hmm, strange, which version of the integration are you using?

CasaPetrillo commented 2 years ago

How can I verify the version of the integration I've installed?

CasaPetrillo commented 2 years ago

ok, solved! I installed the master version, rebooted and updated! now everything works to perfection! thank you for your support!