richibrics / IoTuring

Your Windows, Linux, macOS computer as MQTT and HomeAssistant integration

Home Page:https://pypi.org/project/IoTuring/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot add Entity 'UpTime' on freshly installed v2024.1.1

Baxxy13 opened this issue · comments

While setting up IoTuring on a new system (debian bookworm), i cannot add the entity 'UpTime'.
It seems ignored.

Manually adding 'UpTime' to configurations.json works:

    "active_entities": [
        {
            "type": "AppInfo"
        },
        {
            "type": "Uptime"
        },
        {
            "type": "BootTime"
        }
    ],

Are the other entities shown correctly in the configuration menu ?

Yes, i can add oll other entities without problems.
They then showed in entitity "overview".

Uptime won't add and won't showed in the overview.
GIF 20 02 2024 18-05-13

Thank you for the animation, you don't even get the New entity added message 🤔

I think the problem is the actual name and the NAME attribute of the Uptime class is different (Uptime vs UpTime). In all other classes it's the same.

We should check if the NAME attr is needed at all, the builtin instance.__class__.__name__ or type(instance).__name__ should return something similar, maybe that would be enough, so no similar bugs can happen in the future.

It must be that, no difference in how it is built wrt bootime

Thx for fixing this.
It's working now (again) in 2024.6.1.