rsampayo / sleepme_thermostat

SleepMe Thermostat integration is a custom component for Home Assistant
8 stars 1 forks source link

Config flow could not be loaded: {"message":"Invalid handler specified"} #1

Closed mikesalz closed 2 months ago

mikesalz commented 2 months ago

I am excited to see that someone is working on this project! I am happy to help test. I tried adding to HA today and received the error below:

image

image

rsampayo commented 2 months ago

Hello Mike, congrats on being the first beta tester. Could you check your logs in setting > system> logs. And see if there is more info on the error? Also could you confirm you home assistant version?

mikesalz commented 2 months ago

Hi @rsampayo I am on HA 2024.8.1.

Below is the info from the log. In other custom components I have a config_flow.py. But not in the sleepme_thermostat folder. So maybe that is the issue?

Logger: homeassistant.config_entries
Source: config_entries.py:2871
First occurred: 4:12:53 PM (2 occurrences)
Last logged: 4:14:21 PM

Error occurred loading flow for integration sleepme_thermostat: No module named 'custom_components.sleepme_thermostat.config_flow'
ChrisFontanini commented 2 months ago

I get the same error. I'm also on HA 2024.8.1

Logger: homeassistant.config_entries
Source: config_entries.py:2871
First occurred: 3:32:12 PM (1 occurrences)
Last logged: 3:32:12 PM

Error occurred loading flow for integration sleepme_thermostat: No module named 'custom_components.sleepme_thermostat.config_flow'
rsampayo commented 2 months ago

Yeah, I forgot to add the config_flow.py file. I also updated all the files. Please replace the files with the new ones and let me know if it works.

ChrisFontanini commented 2 months ago

That fixed it, thanks!

rsampayo commented 2 months ago

The config_flow should only ask for one input. It does not show the field name (I haven't been able to fix that) it is the token. After that it should list the devices in your account and you should be able to add them one by one.

rsampayo commented 2 months ago

Let me know if there is anything else I could add.

rsampayo commented 2 months ago

FYI. I'm not sure if the low water level sensor works, I haven't tested it. Let me know if it works for you.

ChrisFontanini commented 2 months ago

I'll follow up about the water sensor next time it's low, I'm sure it won't be long. I was able to add both Docks without issue.

mikesalz commented 2 months ago

Thanks @rsampayo! I was able to add both of our Dock Pros. I haven't tested the functionality yet, but will do that tonight. I have the following sensors which I already had created using rest. Any chance you can add them to the integration?

rsampayo commented 2 months ago

You should see a sensor inside the device called: [Device name ] Water Level Low. Do you see it?

mikesalz commented 2 months ago

Yes, I do see it. But in the API they have a separate sensor that shows the percent full. Not sure if it helps, but here is the yaml for my rest sensors. I have separate sensors for Water Level (percent) and one for Low Water (binary).

    sensor:
      - name: "Mike's Dock Pro Water Temperature"
        device_class: temperature
        unit_of_measurement: "°F"
        value_template: "{{ value_json.status.water_temperature_f|int }}"
      - name: "Mike's Dock Pro Set Water Temperature"
        device_class: temperature
        unit_of_measurement: "°F"
        value_template: "{{ value_json.control.set_temperature_f|int }}"
      - name: "Mike's Dock Pro Water Level"
        device_class: moisture
        unit_of_measurement: "%"
        value_template: "{{ value_json.status.water_level }}"
      - name: "Mike's Dock Pro Status"
        value_template: "{{ value_json.control.thermal_control_status }}"
    binary_sensor:
      - name: "Mike's Dock Pro Connected"
        device_class: connectivity
        value_template: "{{ value_json.status.is_connected }}"
      - name: "Mike's Dock Pro Low Water"
        device_class: moisture
        value_template: "{{ value_json.status.is_water_low }}"
rsampayo commented 2 months ago

I'll follow up about the water sensor next time it's low, I'm sure it won't be long. I was able to add both Docks without issue.

where does all that water go!?

rsampayo commented 2 months ago

Yes, I do see it. But in the API they have a separate sensor that shows the percent full. Not sure if it helps, but here is the yaml for my rest sensors. I have separate sensors for Water Level (percent) and one for Low Water (binary).

    sensor:
      - name: "Mike's Dock Pro Water Temperature"
        device_class: temperature
        unit_of_measurement: "°F"
        value_template: "{{ value_json.status.water_temperature_f|int }}"
      - name: "Mike's Dock Pro Set Water Temperature"
        device_class: temperature
        unit_of_measurement: "°F"
        value_template: "{{ value_json.control.set_temperature_f|int }}"
      - name: "Mike's Dock Pro Water Level"
        device_class: moisture
        unit_of_measurement: "%"
        value_template: "{{ value_json.status.water_level }}"
      - name: "Mike's Dock Pro Status"
        value_template: "{{ value_json.control.thermal_control_status }}"
    binary_sensor:
      - name: "Mike's Dock Pro Connected"
        device_class: connectivity
        value_template: "{{ value_json.status.is_connected }}"
      - name: "Mike's Dock Pro Low Water"
        device_class: moisture
        value_template: "{{ value_json.status.is_water_low }}"

The percentage sensor does not really help. It only reports 2 values . 100 when full. and 50 when empty. At least in my tests. Have you been able to test other values?

mikesalz commented 2 months ago

Ah, ok. I didn't know it only had 2 values. I literally created them this morning just a few hours before I saw that you created an integration!

rsampayo commented 2 months ago

let me know if you do see it report different levels according to the real levels and I'll add it.

mikesalz commented 2 months ago

I'll keep an eye on it and let you know. Both Dock Pros are full right now so it might take a little time for the levels to drop.

Two more things -

  1. Is there any chance this integration can be added to HACS? Or even better, submitted to HA core? (I know it is super early in the development process. Just asking!)

  2. This is minor, but there is a broken image on the device info page - image

rsampayo commented 2 months ago

I'll keep an eye on it and let you know. Both Dock Pros are full right now so it might take a little time for the levels to drop.

Two more things -

  1. Is there any chance this integration can be added to HACS? Or even better, submitted to HA core? (I know it is super early in the development process. Just asking!)
  2. This is minor, but there is a broken image on the device info page - image

Yeah, I haven't figured out how to set the icons on a custom integration (any ideas?) . And I did think about HACS I just havent looked into it and I wasn't sure if anyone would even be interested.

rsampayo commented 2 months ago

If you have any other ideas let me know. There are 3 people in the world that use this integration and you are one of them :)

mikesalz commented 2 months ago

I've never created a custom integration so I don't think I can help much with getting the icon to show up or getting it into HACS. But I'll definitely let you know if I think of anything else that can be added. BTW, you did an amazing job with this. I am really excited about it!