Giter Club home page Giter Club logo

Comments (18)

stikonas avatar stikonas commented on June 18, 2024 1

Agreed, we should properly implement devices in this integration, not just entities. I had a brief go at it but didn't get it to work. (Need to read up a bit more on home assistant API).

from heatmiser-for-home-assistant.

PhillyGilly avatar PhillyGilly commented on June 18, 2024

We are making good progress and my switches now show as Entities

image
However the Repeaters have disappeared from HA.
I was wondering if they can be added in switch.py as a third type.
Under a previous version I could see where to go i.e:

for device in NeoHubJson['devices']:
    if ((device['DEVICE_TYPE'] != 6) and ('TIMECLOCK' in device['STAT_MODE'])) or (device['DEVICE_TYPE'] == 6) or (device['DEVICE_TYPE'] == 10) :
        name = device['device']
        
        if ((device['DEVICE_TYPE'] != 6) or (device['DEVICE_TYPE'] != 10) :
            _LOGGER.info("Thermostat as Switch Named: %s " % name)
            switch_type = NEO_STAT
        elif(device['DEVICE_TYPE'] == 6) :
            _LOGGER.info("Neoplug Named: %s " % name)
            switch_type = NEO_PLUG
        elif(device['DEVICE_TYPE'] == 10) :
            _LOGGER.info("Repeater Named: %s " % name)
            switch_type = REPEATER
        else:
            _LOGGER.info("Something that isn't a switch or a neoplug or a repeater found!")

        switches.append(HeatmiserNeostatSwitch(hub, name, switch_type))

but now with this comment, I'm not sure
# FIXME: handle NEO_PLUG with DEVICE_TYPE == 6, needs support in neohubapi

Even if that works, it's not the whole answer as what I need to know is that the Neohub can "see" the repeaters in real time. The best answer I have to that is to create another entity which piggy backs on the repeater entity and shows it presence by changing icon.

  • platform: template
    switches:
    repeater_node_26183:
    friendly_name: "Node 1"
    value_template: "{{ is_state('switch.repeaternode26183', 'on') }}"
    turn_on:
    service: switch.turn_on
    data:
    entity_id: switch.repeaternode26183
    turn_off:
    service: switch.turn_off
    data:
    entity_id: switch.repeaternode26183
    icon_template: >-
    {% if is_state('switch.repeaternode26183', 'unavailable') %}
    mdi:access-point-off
    {% else %}
    mdi:access-point
    {% endif %}

from heatmiser-for-home-assistant.

PhillyGilly avatar PhillyGilly commented on June 18, 2024

Just upgraded my hub to Gen2, so I will look forward to a new release too. Thanks

from heatmiser-for-home-assistant.

PhillyGilly avatar PhillyGilly commented on June 18, 2024

I have two new devices which I assume are the repeaters, but they're shown as unnamed instead of having the repeater_number as previously:
image

from heatmiser-for-home-assistant.

PhillyGilly avatar PhillyGilly commented on June 18, 2024

Is it possible to get these unnamed devices a) named and b) Shown as part of the Heatmiser Neo Climate? Thanks

from heatmiser-for-home-assistant.

ribbal avatar ribbal commented on June 18, 2024

@PhillyGilly, does the latest update resolve this device/entity count issue? It seems to work for me with Neostats and a Neostat-HW (I don't have any Neostat-E or repeaters).

from heatmiser-for-home-assistant.

PhillyGilly avatar PhillyGilly commented on June 18, 2024

HI @ribbal Under the version I'm running d2bb05d I get 12 devices without duplication
image
but I still get two more entities which are the repeaters (as above).
image
I will try the latest version and get back, but I feat that I will lose the repeaters even if the duplicates are resolved (see#94).

from heatmiser-for-home-assistant.

PhillyGilly avatar PhillyGilly commented on June 18, 2024

OK, I've just upgraed to the latest available and I get the duplication again.
image
For the neostat-e I have two devices e.g.
image
with the capitalise Neostat reporting:
image
and the lowercase neostat reporting:
image

One of the unnamed devices has disappeared which suggests that the link between my two repeaters is down. Checking in the Heatmiser app confirms that the Neostat which is connected via the two repeaters is off-line. However in HA the unavailable neostat-e is still showing as active.
image

from heatmiser-for-home-assistant.

ribbal avatar ribbal commented on June 18, 2024

What is in the list of '29 devices'?

from heatmiser-for-home-assistant.

PhillyGilly avatar PhillyGilly commented on June 18, 2024

image
image

from heatmiser-for-home-assistant.

ribbal avatar ribbal commented on June 18, 2024

Are you able to select any of those duplicate devices and remove them?

from heatmiser-for-home-assistant.

stikonas avatar stikonas commented on June 18, 2024

Are you able to select any of those duplicate devices and remove them?

I don't see any delete button in the device list (although I don't have any duplicate devices myself, not sure what's going on here). In some other integrations (e.g. Tasmota) I can delete devices. So I guess there is some HA API that we need to hook into for deletion to work.

from heatmiser-for-home-assistant.

ribbal avatar ribbal commented on June 18, 2024

No, I don't see any delete option either, but I also don't have any duplicate devices. If I recall correctly (though, can't be certain), I had to manually delete the duplicate 'floor temperature sensor' devices that roscoegray had introduced in Oct 2021 (that no longer exist now) that I think this issue may be related to.

I suspect that HA is caching some data (perhaps in the database) that may disappear over time. In this scenario, I wonder if the delete option is available.

from heatmiser-for-home-assistant.

ribbal avatar ribbal commented on June 18, 2024

@PhillyGilly, can I suggest you try to 'Delete' the Heatmiser Neo Climate integration and re-add it? I've done this previously without affecting any data/automations, etc..

from heatmiser-for-home-assistant.

ribbal avatar ribbal commented on June 18, 2024

Yep, this definitely looks like it's related to those 'floor temperature sensors' that no longer exist in the integration (based on screenshots above):

image

from heatmiser-for-home-assistant.

PhillyGilly avatar PhillyGilly commented on June 18, 2024

That worked, thank you. Maybe deleting all existing devices and entities should be part of the new release implementation?
image
And my repeaters are hanging in there as unnamed devices.
Now all I need is if(device['DEVICE_TYPE'] == 10) : switch_type = REPEATER and I will be vey happy.

from heatmiser-for-home-assistant.

ribbal avatar ribbal commented on June 18, 2024

@PhillyGilly, I believe that the 'Entity Count' issue has been resolved and you should see the 9 Neostats, 3 Neostat-E, 5 Neostat-HW devices that you have. The remaining issue appears to be that your repeaters are 'unnamed'.

As the message trail on this issue is quite long (and confusing), please could I ask that you close it and open a separate targeted issue related to the 'unnamed' repeaters? I believe that fixing the naming issue will result in the repeaters appearing in the device/entity list (in your last screenshot above).

from heatmiser-for-home-assistant.

PhillyGilly avatar PhillyGilly commented on June 18, 2024

@ribbal OK. See new issue #96

from heatmiser-for-home-assistant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.