ioBroker / ioBroker.lovelace

Visualization with Lovelace-UI
Apache License 2.0
58 stars 26 forks source link

Light Card ohne Dimmfunktion #49

Closed nelzon101 closed 4 years ago

nelzon101 commented 5 years ago

Hallo Mein Adapter hab ich sowohl via Iobroker-Adapter, als auch via Github (Expertenmodus) installiert. Beim hinzufügen mit der Karte "Light" erscheint kein Einstellbogen über der Lampe. Im Datenpunkt number und light pobiert. Dimmen mithilfe eines normalen sliders funktioniert.

Alles mit Chrome (PC&Tablet) ausprobiert.

Noch jemand mit dem Problem oder gar einer Lösung hier?

Gruß Nelzon

algar42 commented 5 years ago

please try current version from git.

dasFelix commented 5 years ago

Same here (also with current version from git). Tried 0.24 and 0.23

dasFelix commented 5 years ago

I've tried some rollbacks. v0.1.5 => WORKS v0.2.0 => (could not install) --- No matching version found for iobroker.lovelace@0.2.0.npm ERR! notarget In most cases you or one of your dependencies are requestingnpm ERR! notarget a package version that doesn't exist. v.0.2.1 => does NOT work v0.2.3 => does NOT work

algar42 commented 5 years ago

could you please give some more details in English with maybe some pictures of what is expected and what is not working? and Please also try version from my repo - https://github.com/algar42/ioBroker.lovelace.git

dasFelix commented 5 years ago

Thx. I tried also your version from your repo. Did not work as well for me :(

The enitity I've made in advance of hue.0.lightxyz.level then I add a light card but I don't get the "dim ring" above.

I would expect something like that: lovelace5

But it looks like this:
lovelace4

The generated html looks like this: lovelace3

And as I mentioned above with v0.1.5 it works. So I guess my other steps are correct.

algar42 commented 5 years ago

hmmm... really strange. here are my light object: image and object description for brightness: image

Please check how roles and object properties are assigned, e.g. units etc. it works for me with the code from my repo: image

dasFelix commented 5 years ago

I use directly the state of the child object of the hue adapter. As I see you generated some aliases and your object is manually generated. My object/role looks like this: (role = level.dimmer) lovelace6 I never tried this with "manual created" objects.

algar42 commented 5 years ago

Can you try the following:

  1. assign some room and function at channel level
  2. change role to level.brightness for bri state
  3. restart lovelace it then should detect your device automatically... probably.

with regards to only one dimmer state - I'll take a look into code later. I did not try that.

dasFelix commented 5 years ago

Thank you. There is some progress: I tried what you said... I deleted the manual entity first. After I assigned some rooms and functions. Nothing changed with hue-adapter. No light shown up. Manual entity showed the same issue (non dimmable).

I tried the same with my deCONZ adapter and the light showed up automatically. Also I have the "dim-ring"-thing :) But the light is not switchable (no reaction). Also changing the dim-wheel has no function.

Then I added a manual entity again on the "level.dimmer" state. Then the light is switchable by clicking the bulb. But no dim-wheel is showing up. The same as before with the hue adapter. When I rename the role of it's default "level.dimmer" to "level.brightness" does not change anything.

I always restarted the lovelace instance when I changed something...

Lights with hue-adapter has ".bri" which has values from 0-255 and ".level" has values from 0-100(%).

Lights with deCONZ-adapter has only one state (.bri) which has values from 0-255.

Screens: lovelace8

and lovelace7

dasFelix commented 5 years ago

BTW: the manual entity light card. I can switch "OFF" the light by clicking the bulb. But it does not switch on again by another click on that bulb. But bulb-icons changes correctly if I switch the bulb manually (not with lovelance). Strange thing.

algar42 commented 5 years ago

Please try to re-install from my repo. I did some changes to manually added dimmer states..

dasFelix commented 5 years ago

Wow a huge step forward now 👍 ;) Thank you a lot!

I tested it with all adapters I have:

Manual added dimmer states work with lights on my HUE adapter and deCONZ adapter. For the hue-lights I have to choose the [hue-lightXY].level state (bri shows correct dimmer state but I cannot change it - not an issue I guess).

I have another light connected to a shelly1 switch (relay). This has no dimmer feature and it shows no dim-wheel, which is correct for a light like this. But the issue is: I can switch that light ON but not OFF again. Manually switched OFF the bulb shows correct state.

This are some screen shots of the "shelly light" and object lovelace9

Object - I have to use "[shelly-XYZ].Relay0.switch" state which has a "switch" role: lovelace10

algar42 commented 5 years ago

Cool. thank you for testing. I'll look at remaining issues when I have some time..

algar42 commented 5 years ago

for shelly, if its state is just true/false you you could try to use entity button card and assign icon manually, e.g. 'mdi:lamp'. It should work I think .. and you will need to assing state as switch (not as light)

dasFelix commented 5 years ago

Thank you for your work and solution with those dimmer switches. The Shelly Thing is nice-to-have but as you recommended there is another solution/work-around for it. This is exactly what I tried :) lovelace11

dasFelix commented 5 years ago

I just discovered a small issue with the dimmer light card when using the recently modified light card.

I have some warnings in the iobroker Log... (No max value defined) as follows: lovelace12

But there are max values in their config: lovelace13

With the hue adapter there are no such warnings. Only with lights connected by deCONZ.

algar42 commented 5 years ago

Yes, I know about this. Try to add min, max at channel level - it looks like a place where adapter now tries to find them :)

dasFelix commented 5 years ago

I just // out commented the log write function in the else functions. But now I tried your approach. This works too, indeed. But not on the channel level - I guess you mean "device" level... When I have deconz.0.lights.5 then .lights is channel and .5 is device. It worked on the device level (.5).

dasFelix commented 5 years ago

sorry I was to fast with my success above :( When I switch off the lights external (i.e. alexa) then the
"min": 0, "max": 255, Settings on device level are gone. Deconz Adapter seems to delete those values.

Also when I switch on/off a deconz-light by alexa the bulb in lovelace UI does not change. When I switch off the bulb remains ON. But when I dim the light by alexa the dim wheel changes accordingly.

All those problems are only with deconz, not with hue adapter.

algar42 commented 5 years ago

I do not have Deconz devices, so I can only guess.. Am I right that now for Deconz light you have only lovelace state assigned to .bri state (level.dimmer)? It seems to me that Alexa sets .on state to false to switch it off and the .bri value remains unchanged. if it is the case there is nothing we can do in lovelace having only one dimmer state. The solution will be to make an alias to deconz light like in my example above with two states (on and bri) which will make it possible for lovelace to detect this alias device automatically as light entity with both states included.. another advantage of this is that the light will switch on at the previous bri level instead of 100% :)

In new js-controlles 2.0 Aliases are very powerful thing for such cases.. we can group states to devices and channels as we need it order to make them detected automatically by lovelace and iot adapters.

algar42 commented 5 years ago

@dasFelix please try yet another small updated from my repo. Switching off from lovelace is slightly corrected.

dasFelix commented 5 years ago

Thank you... I saw your system with the aliases yesterday and I like it very much. Not only because of the lights also because of the system itself. And you can calculate values like offset of temperature and things like that. But I have not very much time today to play with all the aliases. But I will try your new updated version from your repo right now and I'll keep you updated.

dasFelix commented 5 years ago

At first sight there seems to be an improvement again 👍

I don't know what you were aiming at but so far as I can see:

WW1983 commented 4 years ago

hmmm... really strange. here are my light object:

and object description for brightness:

Please check how roles and object properties are assigned, e.g. units etc. it works for me with the code from my repo:

@algar42 its offtopic. but can you say wich weather-card you use. the original Card dont Show icons

algar42 commented 4 years ago

@WW1983 i currently use iobroker.accuweather adapters together with weather card i developed for it.. See in readme weather section

WW1983 commented 4 years ago

@WW1983 i currently use iobroker.accuweather adapters together with weather card i developed for it.. See in readme weather section

Thank you. I try it

algar42 commented 4 years ago

@WW1983 i currently use iobroker.accuweather adapters together with weather card i developed for it.. See in readme weather section

Thank you. I try it

@WW1983 , ah... and probably, if you are going to use accuweather you will also need to update type-detector (https://github.com/algar42/ioBroker.type-detector.git). There is a pull request for accuweather type which is not yet merged to main repo :(

WW1983 commented 4 years ago

@WW1983 i currently use iobroker.accuweather adapters together with weather card i developed for it.. See in readme weather section

Thank you. I try it

@WW1983 , ah... and probably, if you are going to use accuweather you will also need to update type-detector (https://github.com/algar42/ioBroker.type-detector.git). There is a pull request for accuweather type which is not yet merged to main repo :(

It works. thank you :)

algar42 commented 4 years ago

@WW1983 Works as expected? Language and units are Ok? If any findings with weather please open issue for card or accuweather adapter.

WW1983 commented 4 years ago

Works as expected? Language and units are Ok? If any findings with weather please open issue for card or accuweather adapter.

It works fine for me. Language and units are OK! If i have a Problem with the card i would open issue. thak you! Will the "Trial API" end after limited Hours? Great work with the Adapter and Card!

algar42 commented 4 years ago

@WW1983 Trial Accuweather API allows to make 50 requests per day. Adapter makes about 30 requests per day (see its readme), so you have about 20 if you want to get weather manually - there are buttons in adapter Object for this :)

WW1983 commented 4 years ago

@WW1983 Trial Accuweather API allows to make 50 requests per day. Adapter makes about 30 requests per day (see its readme), so you have about 20 if you want to get weather manually - there are buttons in adapter Object for this :)

Ah cool. ist enough for me :D thank you

@dasFelix sorry das ich dein issue hier missbraucht habe

GermanBluefox commented 4 years ago

Can it be closed?

algar42 commented 4 years ago

yes

WW1983 commented 4 years ago

Don't work for me with Hue-Lamp

Bildschirmfoto 2019-12-06 um 16 54 25
WW1983 commented 4 years ago

Can be closed