Skip to content

Fix Ikea Fyrtur state/on value - #6809

Merged
manup merged 1 commit into
dresden-elektronik:masterfrom
IPSAttain:master
Mar 31, 2023
Merged

manup merged 1 commit into
dresden-elektronik:masterfrom
IPSAttain:master

Conversation

@IPSAttain

Copy link
Copy Markdown
Contributor

Behaviour of command "state/on" differs from IKEA kadrilj device .
Also before implement that devices as DDF, it was different.
"state/on" must be true, if "state/lift" > 0

command "state/on" differs from IKEA kadrilj device .
also the behavior before implement that devices as DDF was different.
"state/on" must be true if "state/lift" > 0
@Smanar

Smanar commented Mar 19, 2023

Copy link
Copy Markdown
Collaborator

Right, nice catch.
But state/on is deprecated ATM, it's still so important for you third app (cause issue) or it's a just correction.

@IPSAttain

IPSAttain commented Mar 19, 2023

Copy link
Copy Markdown
Contributor Author

Hi Smanar,

thx for confirmation.
Yes this causes issues in our implementation. We have a general implementation for every "dimmable light" .
If the light state is off, it will force the dim-value to 0. In the UI you will see the brightness if the state is "on"/true only.

This DDF implementation shows me the brightness always as 0 until it reached the 100%

`
if (property_exists($Payload, 'bri')) {
$bri = ($Payload->bri>1)?round($Payload->bri/2.55):$Payload->bri;
if (property_exists($Payload, 'on')) {
if(!$Payload->on) $bri = 0; // force the dim value to 0, if state/on is false
}
$this->SetValue('Z2D_Brightness', $bri);

}`

@Smanar

Smanar commented Mar 19, 2023

Copy link
Copy Markdown
Collaborator

Yeah better to have good value, even it's not used every where.
One day state/on and state/bri will be removed for covering device, but I think your code already manage it with if (property_exists

@manup manup added the Fix label Mar 22, 2023
@manup manup added this to the v2.21.2 milestone Mar 26, 2023
@manup
manup merged commit 2cb9742 into dresden-elektronik:master Mar 31, 2023
@manup manup changed the title Update fyrtur_block-out_roller_blind.json Fix Ikea Fyrtur state/on value Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants