iloveicedgreentea / jvc_homeassistant

JVC Integration for Home Assistant
20 stars 4 forks source link

Platform error remote.jvc_projectors - cannot import name 'GAMING_MODE_HDR_COMMAND' #16

Closed rcdailey closed 1 year ago

rcdailey commented 1 year ago

I get this error:

Platform error remote.jvc_projectors - cannot import name 'GAMING_MODE_HDR_COMMAND' from 'custom_components.jvc_projectors.const' (/config/custom_components/jvc_projectors/const.py)

Using this in my configuration.yaml file:

remote:
  - platform: jvc_projectors
    name: JVC Projector
    password: abc123
    host: 192.168.1.163
    scan_interval: 15

This appears to be a regression introduced in version 2.0.6. If I downgrade to v2.0.5, I do not get this error when I run Check Configuration in HASS.

iloveicedgreentea commented 1 year ago

Sorry about that I pushed a fix. Use HACS to update to 2.0.7 which fixes this.

rcdailey commented 1 year ago

Thanks. While I'm testing the new build, you should know that the README has a mistake in it. Instead of this for the sensor:

sensor:
  platform: template
  sensors:

It should be:

sensor:
  - platform: template
    sensors:
rcdailey commented 1 year ago

I can confirm that 2.0.7 fixes the error. I'll leave this issue open until you fix the README issue. Thank you for the quick fix!

iloveicedgreentea commented 1 year ago

That works for my config but I guess it would not be correct if someone pasted that in when they already have other entires so I updated just in case. Thanks