richibrics / IoTuring

Your Windows, Linux, macOS computer as MQTT and HomeAssistant integration
https://pypi.org/project/IoTuring/
GNU General Public License v3.0
70 stars 6 forks source link

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

Closed Baxxy13 closed 7 months ago

Baxxy13 commented 7 months ago

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"
        }
    ],
richibrics commented 7 months ago

Are the other entities shown correctly in the configuration menu ?

Baxxy13 commented 7 months ago

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

richibrics commented 7 months ago

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

infeeeee commented 7 months ago

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.

richibrics commented 7 months ago

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

Baxxy13 commented 3 months ago

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