MindrustUK / Heatmiser-for-home-assistant

Heatmiser Neo-Hub / Neostat support for home-assistant.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Duplicate entities being created for the floor temperature sensor

ribbal opened this issue · comments

sensor.py creates duplicate neoStat entities purely to expose the 'floor_temperature' property. This is inefficient, and instead should be exposed as an additional attribute on the climate state attributes.

Looping in @roscoegray, who added sensor.py.

Thanks @ribbal, are you able to add custom properties to the climate entity?

Yes, I will do that shortly - just waiting on whether my other recent PR gets approved and merged, which will affect the final changes for the additional attribute.

Wish I knew that! Don't know why I assumed you couldn't. Your PR looks good, makes sense to do.

Created PR (#90) to add a new 'floor_temperature' state attribute. The existing sensor entity is now obsolete and will be removed after 31st Dec 2021.

commented

Sorry - I don't understand what's going on here. I recently updated my HeatMiser custom component using HACS (having not done so for a while). Everything appears to be working, but I now get this "OBSOLETE" message in the log. I can't make head nor tails of it - what does it mean?

For reference, I have two neoStats (v2) and one Wireless Air Sensor, which is used as a remote thermostat for one of the neoStats. The two neoStats show up correctly, but the Wireless Air Sensor shows up twice. Once with a floor temp sensor, second time with a climate entity. I don't have any floor temperature sensors.

Can you help?

@ntompson Apologies, its my bad. I added the floor sensor attribute as an additional sensor, not realising at the time you can add custom attributes to the climate class.

@ribbal has now just added the floor_sensor attribute to the climate class and the separate sensor version will be removed at the end of the year as no longer needed. That's the message in the logs making the user aware, just encase they started using it for automations etc.

I haven't got a wireless air sensor so unsure of how they report. Is the floor temp sensor reporting a valid value?

@ntompson, the duplicate (floor) Air Sensor and the "OBSOLETE" message will be removed in the new year. They were left in to allow people to migrate any automations/scripts/etc to the proper 'climate' entity that they can now use instead. I would suggest not using the duplicate (floor) Air Sensor in any automatons/scripts/etc.

However, I would be interested in knowing what your duplicate (floor) Air Sensor is reporting for the 'CURRENT_FLOOR_TEMPERATURE' value. Would you be able set the logging to debug and find this value, please? (After the new year, it doesn't matter anyway, because it will be removed; but, it would be good to know)

commented

Thanks for the quick reply and no worries at all @roscoegray. The main confusion for me was I couldn't decide whether the OBSOLETE message was telling me that there was something wrong with my current config (which there isn't) or was a warning not to do something (which it sounds like it is).

In any case, CURRENT_FLOOR_TEMPERATURE is 0 for the Air Sensor (whereas it is 127.5 for my NeoStats). As mentioned, I don't have any floor temperature sensors.

As far as entities in HA goes, the Air Sensor shows up with two entities:

  • A climate entity, which correctly shows the current temperature (and a target temperature of 0°). It has model neoStat. It is always in an Idle state with Heat operation.
  • A separate sensor entity, which is called Floor Temperature and has a value of 0°. It has model NeoStat (note capital N)

From the debug log, here is the relevant excerpt for the Air Sensor (formatted for readability):

_data_=namespace(
    ACTIVE_LEVEL=0, 
    ACTIVE_PROFILE=0, 
    ACTUAL_TEMP='19.5', 
    AVAILABLE_MODES=['heat'], 
    AWAY=False, 
    COOL_MODE=False, 
    COOL_ON=False, 
    COOL_TEMP=0, 
    CURRENT_FLOOR_TEMPERATURE=0, 
    DATE='sunday', 
    DEVICE_ID=3, 
    FAN_CONTROL='Automatic', 
    FAN_SPEED='Off', 
    FLOOR_LIMIT=False, 
    HC_MODE='VENT', 
    HEAT_MODE=True, 
    HEAT_ON=False, 
    HOLD_COOL=0, 
    HOLD_OFF=True, 
    HOLD_ON=False, 
    HOLD_TEMP=0, 
    HOLD_TIME='0:00', 
    HOLIDAY=False, 
    LOCK=False, 
    LOW_BATTERY=False, 
    MANUAL_OFF=True, 
    MODELOCK=False, 
    MODULATION_LEVEL=0, 
    OFFLINE=False, 
    PIN_NUMBER='xxxx', 
    PREHEAT_ACTIVE=False, 
    PRG_TEMP=0, 
    PRG_TIMER=False, 
    RECENT_TEMPS=['19.5', '19.5', ... , '19.5'],
    SET_TEMP='0.0', 
    STANDBY=False, 
    SWITCH_DELAY_LEFT='0:00', 
    TEMPORARY_SET_FLAG=False, 
    THERMOSTAT=True, 
    TIME='0:00', 
    TIMER_ON=False, 
    WINDOW_OPEN=False, 
    WRITE_COUNT=0, 
    ZONE_NAME='Downstairs Remote'
)