Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smart Irrigation not working after updating to 2024.4.5 #362

Closed
1 task done
DanDan800 opened this issue May 9, 2024 · 7 comments
Closed
1 task done

Smart Irrigation not working after updating to 2024.4.5 #362

DanDan800 opened this issue May 9, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@DanDan800
Copy link

What happened?

Installation broke after updating to 2024.4.5. Entities are not available anymore. .

How to reproduce

Downgrade and new installation didn't fix the issue

Relevant log output

Logger: homeassistant.config_entries
Quelle: config_entries.py:575
Erstmals aufgetreten: 10:25:49 (1 Vorkommnisse)
Zuletzt protokolliert: 10:25:49

Error setting up entry Smart Irrigation for smart_irrigation
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 575, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/smart_irrigation/init.py", line 72, in async_setup_entry
store = await async_get_registry(hass)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/smart_irrigation/store.py", line 645, in async_get_registry
return cast(SmartIrrigationStorage, await task)
^^^^^^^^^^
voluptuous.error.MultipleInvalid: expected SOLRAD_behavior or one of '1', '2', '3' for dictionary value @ data['solrad_behavior']

Which version are you running?

2024.4.5

Diagnostics file

  • I have attached a diagnostics file

Additional information

No diagnostic file existing.

@DanDan800 DanDan800 added the bug Something isn't working label May 9, 2024
@jeroenterheerdt
Copy link
Owner

copy/paste the contents of the smart_irrigation.storage file please.

@DanDan800
Copy link
Author

DanDan800 commented May 10, 2024

deleted the code.
Sorry for the misunderstanding

@jeroenterheerdt
Copy link
Owner

what are you doing? you just copy/pasted all code. find the smart_irrigation.storage file in the .storage directory and paste that. Not the python code

@DanDan800
Copy link
Author

Sorry, i pasted store.py. I am not a Programmer, so i didn´t even know about the hidden folder .storage.

This should be the correct content:

{
"version": 3,
"minor_version": 1,
"key": "smart_irrigation.storage",
"data": {
"config": {
"calctime": "23:00",
"units": "metric",
"use_owm": true,
"autocalcenabled": true,
"autoupdateenabled": true,
"autoupdateschedule": "hours",
"autoupdatedelay": "0",
"autoupdateinterval": "1",
"autoclearenabled": true,
"cleardatatime": "23:59",
"starteventfiredtoday": true
},
"zones": [
{
"id": 0,
"name": "Rasen gesamt ",
"size": 272.0,
"throughput": 7.0,
"state": "automatic",
"bucket": 0,
"old_bucket": 0,
"delta": -2.5255315142200643,
"duration": 0,
"module": 0,
"multiplier": 0.3,
"explanation": "Beachte: Diese Beschreibung nutzt '.' als Dezimalzeichen und zeigt gerundete Werte. Das Modul berechnete einen Evapotranspirationsmangel von -2.5. Der alte Vorrat war 0.
Der maximale Vorrat ist 0.0.Der neue Vorrat ist [alter_Vorrat]+[Veränderung]=0+-2.5=-2.5.
Wenn der Vorrat < 0 ist, ist eine Bewässerung nötig..
Für eine exakte Berechnung der Dauer, wurden folgende Schritte durchgeführt:

  • Der Niederschlag ist [Durchfluss]60/[Größe]=7.060/272.0=1.5
  • Die Dauer ist abs([Vorrat])/[Niederschlag]3600=2.5/1.53600=5888
  • Der Multiplikator wird angewendet. Der Multiplikator ist 0.3, also ist die Dauer 1766
  • Die maximale Dauer wird angewendet. Diese ist 3600.0,
  • Zuletzt wird die Vorlaufzeit angewendet. Die Vorlaufzeit ist 30.0, also ist die Dauer 1796
  • ",
    "mapping": 0,
    "lead_time": 0.0,
    "maximum_duration": 3600.0,
    "maximum_bucket": 0,
    "last_calculated": "2024-05-07T23:00:02.370836",
    "last_updated": "2024-05-08T10:33:57.955242",
    "number_of_data_points": 10
    }
    ],
    "modules": [
    {
    "id": 0,
    "name": "PyETO",
    "description": "Calculate duration based on the FAO56 calculation from the PyETO library.",
    "config": {
    "forecast_days": "1",
    "solrad_behavior": "4"
    },
    "schema": [
    {
    "type": "boolean",
    "name": "coastal",
    "optional": true,
    "default": false
    },
    {
    "type": "select",
    "options": [
    [
    "1",
    "EstimateFromTemp"
    ],
    [
    "2",
    "EstimateFromSunHours"
    ],
    [
    "3",
    "DontEstimate"
    ],
    [
    "4",
    "EstimateFromSunHoursAndTemperature"
    ]
    ],
    "name": "solrad_behavior",
    "required": true,
    "default": "1"
    },
    {
    "type": "integer",
    "name": "forecast_days",
    "required": true,
    "default": 0
    }
    ]
    },
    {
    "id": 1,
    "name": "Static",
    "description": "'Dummy' module with a static configurable duration.",
    "config": {
    "delta": ""
    },
    "schema": [
    {
    "type": "float",
    "name": "delta",
    "required": true,
    "default": 0
    }
    ]
    }
    ],
    "mappings": [
    {
    "id": 0,
    "name": "Default mapping",
    "mappings": {
    "Dewpoint": {
    "source": "owm",
    "sensorentity": "",
    "unit": ""
    },
    "Evapotranspiration": {
    "source": "none",
    "sensorentity": "",
    "unit": ""
    },
    "Humidity": {
    "source": "owm",
    "sensorentity": "",
    "unit": ""
    },
    "Precipitation": {
    "source": "owm",
    "sensorentity": "Sensor.rain_24",
    "unit": "",
    "aggregate": "last"
    },
    "Pressure": {
    "source": "owm",
    "sensorentity": "",
    "unit": ""
    },
    "Solar Radiation": {
    "source": "none",
    "sensorentity": "",
    "unit": ""
    },
    "Temperature": {
    "source": "owm",
    "sensorentity": "",
    "unit": ""
    },
    "Windspeed": {
    "source": "owm",
    "sensorentity": "",
    "unit": ""
    }
    },
    "data": [
    {
    "Windspeed": 0.7703896074229825,
    "Pressure": 1024.0,
    "Humidity": 75,
    "Temperature": 6.61,
    "Dewpoint": 2.5,
    "Precipitation": 0.0,
    "retrieved": "2024-05-08T00:33:57.894725"
    },
    {
    "Windspeed": 0.7703896074229825,
    "Pressure": 1025.0,
    "Humidity": 70,
    "Temperature": 6.55,
    "Dewpoint": 1.48,
    "Precipitation": 0.0,
    "retrieved": "2024-05-08T01:33:57.871671"
    },
    {
    "Windspeed": 1.151844655758634,
    "Pressure": 1025.0,
    "Humidity": 69,
    "Temperature": 5.74,
    "Dewpoint": 0.5,
    "Precipitation": 0.0,
    "retrieved": "2024-05-08T02:33:59.302521"
    },
    {
    "Windspeed": 0.7703896074229825,
    "Pressure": 1025.0,
    "Humidity": 73,
    "Temperature": 5.61,
    "Dewpoint": 1.16,
    "Precipitation": 0.0,
    "retrieved": "2024-05-08T03:33:57.874199"
    },
    {
    "Windspeed": 1.151844655758634,
    "Pressure": 1025.0,
    "Humidity": 73,
    "Temperature": 5.13,
    "Dewpoint": 0.7,
    "Precipitation": 0.0,
    "retrieved": "2024-05-08T04:33:57.850110"
    },
    {
    "Windspeed": 0.0,
    "Pressure": 1026.0,
    "Humidity": 65,
    "Temperature": 5.31,
    "Dewpoint": -0.64,
    "Precipitation": 0.0,
    "retrieved": "2024-05-08T06:33:57.923696"
    },
    {
    "Windspeed": 0.0,
    "Pressure": 1026.0,
    "Humidity": 65,
    "Temperature": 7.27,
    "Dewpoint": 1.14,
    "Precipitation": 0.0,
    "retrieved": "2024-05-08T07:33:57.828853"
    },
    {
    "Windspeed": 2.311168822268947,
    "Pressure": 1026.0,
    "Humidity": 68,
    "Temperature": 9.6,
    "Dewpoint": 3.99,
    "Precipitation": 0.0,
    "retrieved": "2024-05-08T08:33:57.986629"
    },
    {
    "Windspeed": 1.151844655758634,
    "Pressure": 1027.0,
    "Humidity": 64,
    "Temperature": 11.93,
    "Dewpoint": 5.34,
    "Precipitation": 0.0,
    "retrieved": "2024-05-08T09:33:57.868883"
    },
    {
    "Windspeed": 1.9222342631816163,
    "Pressure": 1027.0,
    "Humidity": 51,
    "Temperature": 13.54,
    "Dewpoint": 3.61,
    "Precipitation": 0.0,
    "retrieved": "2024-05-08T10:33:57.955143"
    }
    ],
    "data_last_updated": "2024-05-08T10:33:57.955242"
    }
    ]
    }
    }

    @jeroenterheerdt
    Copy link
    Owner

    Thanks, weirdly enough this seems to be correct. Not sure why it's complaining about the value of the solrad behavior. 4 is a valid value since we added another option. I will check what is going on here. Thanks for letting me know.

    @DanDan800
    Copy link
    Author

    I deleted the storage file and re-installed the Integration. Now it is working again. Maybe the file was somehow corrupt. If you still want me to check something, please let me know.

    @jeroenterheerdt
    Copy link
    Owner

    Thanks for letting me know but I will investigate this a bit more as I don't want people to have to do that for an upgrade.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    bug Something isn't working
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants