Hi,
I dont have that behaviour.
But I’ll let others comment.
Hi,
I dont have that behaviour.
But I’ll let others comment.
just rebooted my whole system. it loads normally without normal CPU And the xiaomi heater isnt found. like before after a restart it takes some time to come online. As soon as the heater comes online the CPU is back between 60 / 90% load. its strange that you dont see this behaviour
maybe its coincidence and its something else.
Hi,
I’m quite new in hassio, I’ve installed miheater in hacs. What’s the next step, should my heater appear automaticaly?
Hi,
Please follow the instructions in https://github.com/ee02217/homeassistant-mi-heater
You need to add this to your configuration.yaml
climate:
- platform: miheater
host: <your device ip address>
token: <your device miio token>
name: xiaomi_heater
model: zhimi.heater.mc2 (optional: zhimi.heater.mc2 | zhimi.heater.zb1 | zhimi.heater.za2)
Obrigado!
It works.
I understood that step for manually installation only.
Good job!
Thanks you!
for complete happiness, there is not enough support for the switches:
Led
Buzzer
Child lock
True
This was supposed to be a temporary solution until someone included this support into the xiaomi official component in Home Assistant.
If someone wants to add those switches to the code, its open
I have a Xiaomi Smartmi Heater 1S and from what I can read in the thread it’s the model with name zhimi.heater.zb1 which seems to work. What I wonder though is are you not using a Xiaomi bridge to get it to work with HA? If so, which one do you recommend?
Hi,
I’m not using any xiaomi bridge. The heater is connected to Wi-Fi and that is how HA reaches it (though cloud).
Can you Please share how you make the template sensors. I can not find out how to do. I make a copy off the template sensors but nothing happens
Where do you get the temperature and termostat sensor from
You have the configuration I used here:
Thank you @sergio_pt for your work!
Does someone started to look at a local way of controlling those heater? (*I am not a big fan of Clouds…)
I hope @sergio_pt doesn’t mind, but I have to share that I recently discovered a different custom component which ALSO supports this heater and with more control over it - it’s called Xiaomi MIoT for Home Assistant.
With this custom component you can setup the device to work with IP + Token (not via cloud) and also control these switches.
Additionally this component is not specific to the heater and allows to integrate a considerable amount of other Xiaomi devices (some not supported by python-miio library and Xiaomi Miio core integration).
Only awkward thing is that this integration is still a bit garbled with Chinese characters here and there, but my usage experience has been quite positive until now.
I don’t mind at all this for me was always temporary until someone came along with a real integration
Can you share how you configured it?
Quick note: both my code and that integration use the same code, so they are both local.
In Lovelace, this is basically its look:
I also created a new climate entity with the switch to turn heater on/off and a separate external temperature sensor. The UI integration also has this option, but although I specified the external temperature sensor in it, the integration-provided climate entity was still using the heater’s integrated temperature sensor. If this gets fixed in a future release, I will be able to skip this additional climate entity.
In terms of UI integration, I have the below entities (temperature sensor and child lock control can be chosen from the UI integration options):
I also had to slightly change the mapping and params in the UI integration config (for details, check upper comments in below YAML), to expose the alarm indicator as entity attribute.
From a HA config perspective, here’s the relevant YAML:
### To make sure that Xiaomi MIoT custom component can fetch all properties needed in HA, changed the mapping/params (idea taken from https://github.com/ha0y/xiaomi_miot_raw/issues/120)
### -- Aquecedor Quarto -- (alarm indicator added)
#Mapping:
#{"heater":{"switch_status":{"siid":2,"piid":1},"fault":{"siid":2,"piid":2},"target_temperature":{"siid":2,"piid":5}},"environment":{"temperature":{"siid":4,"piid":7}},"physical_controls_locked":{"physical_controls_locked":{"siid":5,"piid":1}},"indicator_light":{"brightness":{"siid":7,"piid":3}},"alarm":{"indicator":{"siid":6,"piid":1}}}
#
#Params:
#{"heater":{"switch_status":{"power_on":true,"power_off":false},"target_temperature":{"value_range":[18,28,1]},"main":true,"current_temp_source":"sensor.temperature_158d0001571539"},"environment":{"temperature":{"access":5,"format":"float","unit":"celsius","value_range":[-30,100,0.1]}},"physical_controls_locked":{"enabled":true},"indicator_light":{"brightness":{"value_range":[0,1,1]},"enabled":false},"alarm":{"indicator":{"enabled":true}}}
####################################################
# #
# Switch #
# #
####################################################
switch:
- platform: template
switches:
aquecedor_quarto:
friendly_name: "Aquecedor Quarto"
value_template: "{{ is_state_attr('climate.aquecedor_quarto', 'heater_switch_status', true) }}"
availability_template: "{{ not ( is_state('climate.aquecedor_quarto', 'unavailable') ) }}"
icon_template: "{{ 'mdi:radiator' }}"
turn_on:
service: script.turn_on_aquecedor_quarto
turn_off:
service: script.turn_off_aquecedor_quarto
- platform: template
switches:
luzes_aquecedor_quarto:
friendly_name: "Luzes Aquecedor"
value_template: "{{ is_state_attr('climate.aquecedor_quarto', 'indicator__brightness', 0) }}"
availability_template: "{{ not ( is_state('climate.aquecedor_quarto', 'unavailable') ) }}"
icon_template: "{{ 'mdi:gesture-tap-button' }}"
turn_on:
service: script.turn_on_luzes_aquecedor_quarto
turn_off:
service: script.turn_off_luzes_aquecedor_quarto
- platform: template
switches:
som_aquecedor_quarto:
friendly_name: "Som Aquecedor"
value_template: "{{ is_state_attr('climate.aquecedor_quarto', 'alarm_indicator', true) }}"
availability_template: "{{ not ( is_state('climate.aquecedor_quarto', 'unavailable') ) }}"
icon_template: "{{ 'mdi:alarm-bell' }}"
turn_on:
service: script.turn_on_som_aquecedor_quarto
turn_off:
service: script.turn_off_som_aquecedor_quarto
####################################################
# #
# Scripts #
# #
####################################################
script:
### Turn on Aquecedor Quarto ###
turn_on_aquecedor_quarto:
alias: "Turn on Aquecedor Quarto"
sequence:
- service: xiaomi_miot_raw.set_miot_property
data:
entity_id: climate.aquecedor_quarto
siid: 2
piid: 1
value: true
### Turn off Aquecedor Quarto ###
turn_off_aquecedor_quarto:
alias: "Turn off Aquecedor Quarto"
sequence:
- service: xiaomi_miot_raw.set_miot_property
data:
entity_id: climate.aquecedor_quarto
siid: 2
piid: 1
value: false
### Turn on Luzes Aquecedor Quarto ###
turn_on_luzes_aquecedor_quarto:
alias: "Turn on Luzes Aquecedor Quarto"
sequence:
- service: xiaomi_miot_raw.set_miot_property
data:
entity_id: climate.aquecedor_quarto
siid: 7
piid: 3
value: 0
### Turn off Luzes Aquecedor Quarto ###
turn_off_luzes_aquecedor_quarto:
alias: "Turn off Luzes Aquecedor Quarto"
sequence:
- service: xiaomi_miot_raw.set_miot_property
data:
entity_id: climate.aquecedor_quarto
siid: 7
piid: 3
value: 1
### Turn on Som Aquecedor Quarto ###
turn_on_som_aquecedor_quarto:
alias: "Turn on Som Aquecedor Quarto"
sequence:
- service: xiaomi_miot_raw.set_miot_property
data:
entity_id: climate.aquecedor_quarto
siid: 6
piid: 1
value: true
### Turn off Som Aquecedor Quarto ###
turn_off_som_aquecedor_quarto:
alias: "Turn off Som Aquecedor Quarto"
sequence:
- service: xiaomi_miot_raw.set_miot_property
data:
entity_id: climate.aquecedor_quarto
siid: 6
piid: 1
value: false
Although some entity naming is in PT, I think it is understandable, but feel free to ask any questions. Scripts could also be reduced to a single one with parameters, I haven’t spent time on it yet.
Hope this helps.
Wonderful @sergio_pt! If this is local, this is great.
Now that I’m thinking about that, I’ve indeed didn’t put anything related to my Cloud account in the configuration.
The reason I thought that this was using the cloud is the Lag time (1-2 seconds) from the On-Off and status update.
Thanks again for your work
Good evening, @sergio_pt!
как запустить обогреватель zhimi.heater.za1?
Installed version 118.5, but the heater did not appear = (
Hi,
Was it working before for you?
I don’t have that model só it’s hard for me to debug.
Is there any error in logs?
раньше работал на другом компоненте, который сейчас не поддерживается GitHub - bazuchan/miheater-home-assistant: Home-Assistant custom component for SmartMi Zhimi Heaters
Регистратор: custom_components.miheater.climate Источник: custom_components/miheater/climate.py:80 Интеграция: miheater ([документация] (GitHub - ee02217/homeassistant-mi-heater: Home Assistant integration for MiHeaters.)) Первый происхождений: 07:56:37 (1 вхождения) Последняя авторизация: 07:56:37 обнаружено zhimi.heater.za1 2.1.4 esp32