Alternative to xaomi_miio platform

Hi:
I have problems using miio lights:

  • platform: xiaomi_miio
    name: XaviLamp
    host: 192.168.1.17
    token: 1592146af9007dd6878cb5e12410672b
    model: philips.light.bulb

I have this problem in home assistant 0.81.6

ERROR (MainThread) [homeassistant.components.light] xiaomi_miio: Error on device update!
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py”, line 251, in _async_add_entity
await entity.async_device_update(warning=False)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py”, line 347, in async_device_update
await self.async_update()
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/light/xiaomi_miio.py”, line 493, in async_update
self.max_mireds, self.min_mireds)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/light/xiaomi_miio.py”, line 514, in translate
value_scaled = float(value - left_min) / float(left_span)
TypeError: unsupported operand type(s) for -: ‘NoneType’ and ‘int’

Have anybody experience using Xiaomi light/platform with custom scripts? Because python_miio runs fine!

mieye --ip 192.168.1.17 --token 1592146af9007dd6878cb5e12410672b on
Power on: [‘ok’]

Please don’t double post, you already posted about this.

Hi Nick:
Please accept my apologies. It was no my intention.
I’m trying to divide solutions in two posts…

  1. solve lights miio
  2. replace light by scripts

Do you want I delete one of the topics?
Best

Solved in the configuraton way!
no “model” needed

Which device do you try to use? It doesnt look like a bulb.

Hi syssi.

Xiaomi philips Eyecare 2
https://www.amazon.es/Original-EyeCare-lámpara-Control-inteligente/dp/B07746J7F1

Offcial documentation

indicates model to

model: philips.light.bulb

It set, fails. If not… runs fine.

Best

This is correct. The model philips.light.bulb is the implementation for this device:

https://www.gearbest.com/smart-lighting/pp_644095.html

The model name of your hardware is called philips.light.sread1. If your device is always connected to the power supply please don’t provide a model at your configuration. In this case the device model (= philips.light.sread1) will be auto detected.