stephan192 / hochwasserportal

Home Assistant integration for Länderübergreifendes Hochwasser Portal
MIT License
24 stars 6 forks source link

sensor naming #3

Closed HerbyR56 closed 2 years ago

HerbyR56 commented 2 years ago

Hello, I have installed it and added 2 sensors for the platform:

After restarting I see no sensor with "hochwasserportal". What do I have to expect?

Hohenloherin commented 2 years ago

How did you install it? I managed to get it working after a cold restart (power off). Then I added a card in my dashboard. But the dashboard show only a straight line and does not show the changes. It did once, but I lost it again. Pegelstand_Bühler_dashboard Furthermore I am now struggling with the implementation of more than one sensor in my sensor.yaml. If I add one more sensor in my sensor.yaml it says "duplicate key". Does someone know how to deal with this?

stephan192 commented 2 years ago

I can't reproduce your problem. My test setup (complete configuration.yaml) for multiple sensors:

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

logger:
  default: info
  logs:
    homeassistant.components.cloud: debug
    custom_components.hochwasserportal: debug

sensor:
  - platform: hochwasserportal
    pegel: BY_24238501
  - platform: hochwasserportal
    pegel: FRS_1464130
  - platform: hochwasserportal
    pegel: CZ_307039
  - platform: hochwasserportal
    pegel: NL_BMAAE
  - platform: hochwasserportal
    pegel: BY_16005701

After a restart the following sensor show up if you don't have configured your own lovelace dashboard(s). grafik

If you look at the entity register you can find the sensors created by the hochwasserportal integration. grafik

HerbyR56 commented 2 years ago

I have moved the sensors in an own file and include it in the config: sensor: !include sensors.yaml

The sensors.yaml file looks like:

In the Entities there is no Integration Hochwasserportal. I double check the filestructure for the Integration ... filestructure is ok ...

HerbyR56 commented 2 years ago

ok, I have removed now level, stage and flow and have done a complete restart. Now I find the Integration and the sensors.

I don't know what the problem was.

HerbyR56 commented 2 years ago

grafik

Hohenloherin commented 2 years ago

Now that I did the listing of the sensors separately like HerbyR56 and not in one block under one platform it is working, thank you!

stephan192 commented 2 years ago

It must always be just one pegelper platform. That explains why you got the "duplicate key" error.