JoDehli / PyLoxone

Python Loxone binding
Apache License 2.0
164 stars 40 forks source link

TextStates problem #86

Closed Petahh closed 2 years ago

Petahh commented 2 years ago

Hello guys, any idea how to fix this history graph to text based. This was OK in previous version of HASS. I can't figure out what am I doing wrong... thanks a lot for any suggestion.

Screen Shot 2021-09-17 at 7 42 29 PM Screen Shot 2021-09-17 at 7 42 36 PM . Screen Shot 2021-09-17 at 7 42 56 PM

JoDehli commented 2 years ago

What values are shown in HA in the developer section for the sensor? Did it change with a new HA Version or did it never showed right?

Petahh commented 2 years ago

What values are shown in HA in the developer section for the sensor? Did it change with a new HA Version or did it never showed right?

uuid: 172c222d-033c-edfc-ffff08bdc1be5cb2 plattform: loxone show_last_changed: 'true' unit_of_measurement: '' friendly_name: AC unit icon: hass:fan

It was fine on version 2021.5.4 of HASS.

JoDehli commented 2 years ago

I meant what state does it show? Does it shows the same value as in the loxone?

If it is only on sensor you can make a template sensor of this sensor and use the templated version.

Petahh commented 2 years ago

I meant what state does it show? Does it shows the same value as in the loxone?

If it is only on sensor you can make a template sensor of this sensor and use the templated version.

State is fine, it shows "Off" as its supposed to. How can I template it? I was also trying to customize it but no success. I can't get rid of homeassistant thinking this sensor has unit... It happens on all of my custom text sensors

JoDehli commented 2 years ago

What original device or sensor is it in loxone. Maybe I can make a test on the weekend.

JoDehli commented 2 years ago

If you want you can try the newest version for Pyloxone. I have not made a release or tag so you must download the source of the main branch and copy it to your home assistant custom component folder.

Petahh commented 2 years ago

I have managed to resolve it by template:

template: - sensor: - name: AC unit state: "{{ states('sensor.ac_unit_loxone’) }}"

Not sure why I had the problem.. it might be due to upgrade of HASS, maybe something got screwed up

JoDehli commented 2 years ago

@Petahh They changed something on the unit on the version. I already implemented in the newest version on git. Would be interesting if it works with the newest version. Maybe I release a new version this weekend. Then you can update it over hacs.

What kind of device is the AC unit in loxone. Maybe I can implement the complete device type to ha.

Petahh commented 2 years ago

@Petahh They changed something on the unit on the version. I already implemented in the newest version on git. Would be interesting if it works with the newest version. Maybe I release a new version this weekend. Then you can update it over hacs.

What kind of device is the AC unit in loxone. Maybe I can implement the complete device type to ha.

It’s a type ‘TextState’ I have posted snip from loxone json in the first post.

JoDehli commented 2 years ago

@Petahh You can try the newest version 0.3.8. It is marked as beta for now. Maybe it solves your problem.

JoDehli commented 2 years ago

@Petahh I added a option for your problem in the newest 0.3.8. You can force a text output by adding the unit_of_measurement like so:

sensor:
  - platform: loxone
    name: Motion Sensor Info Text
    uuidAction: "17d4b2a6-021c-9ff0-ffff5a3f44c96e13"
    unit_of_measurement: "None"

You can use "None", "none" or "-" for the unit_of_measurement.

Can you report if it worked for you

Petahh commented 2 years ago

@Petahh I added a option for your problem in the newest 0.3.8. You can force a text output by adding the unit_of_measurement like so:

sensor:
  - platform: loxone
    name: Motion Sensor Info Text
    uuidAction: "17d4b2a6-021c-9ff0-ffff5a3f44c96e13"
    unit_of_measurement: "None"

You can use "None", "none" or "-" for the unit_of_measurement.

Can you report if it worked for you

Hello, unfortunately no change. Still facing same issue on the untemplated sensors.

JoDehli commented 2 years ago

@Petahh have you used the newest beta release? You have to reinstall it to get the latest version.

Petahh commented 2 years ago

@Petahh have you used the newest beta release? You have to reinstall it to get the latest version.

Yes, I have replaced entire loxone folder in custom_components with latest beta version you published. It might be something screwed up with my hass. Don’t spend more time on this, I managed to get it corrected with templates. And huge thanks for your help, and great work on the addon!