Pointer example on User Guide doesn't work

Problem description
The User Guide shows an example of how the memory pointer could work in Slang syntax.
But the example doesn't actually work, and it causes a SPIR-V Validation error.
Repro steps
The following test code is expected to compile and run, but it doesn't.
//TEST(compute, vulkan):SIMPLE(filecheck=SPV): -stage compute -entry computeMain -target spirv -emit-spirv-directly

//TEST_INPUT:set inputBuffer = ubuffer(data=[1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0], stride=4)
RWByteAddressBuffer inputBuffer;

//TEST_INPUT:ubuffer(data=[0], stride=4):out,name=outputBuffer
RWStructuredBuffer<float> outputBuffer;

struct MyType
{
    float a;
};

float test(MyType* pObj)
{
    MyType* pNext = pObj + 1;
    MyType* pNext2 = &pNext[1];
    return pNext.a + pNext->a + (*pNext2).a + pNext2[0].a;
}

[numthreads(1,1,1)]
void computeMain()
{
    MyType data[2];
    data[0] = inputBuffer.Load<MyType>(0);
    data[1] = inputBuffer.Load<MyType>(4);
    outputBuffer[0] = test(&data[0]);
}

When the issue is reproduced, the following output and error messages are observed,
$ build/Release/bin/slangc.exe -stage compute -entry computeMain -target spirv -emit-spirv-directly tests/gh-new.slang
; SPIR-V
; Version: 1.5
; Generator: Khronos; 40
; Bound: 62
; Schema: 0
               OpCapability VariablePointers
               OpCapability PhysicalStorageBufferAddresses
               OpCapability Int64
               OpCapability Shader
               OpExtension "SPV_KHR_storage_buffer_storage_class"
               OpExtension "SPV_KHR_variable_pointers"
               OpExtension "SPV_KHR_physical_storage_buffer"
               OpMemoryModel PhysicalStorageBuffer64 GLSL450
               OpEntryPoint GLCompute %computeMain "main" %inputBuffer %outputBuffer
               OpExecutionMode %computeMain LocalSize 1 1 1

               ; Debug Information
               OpSource Slang 1
               OpName %MyType "MyType"  ; id %6
               OpMemberName %MyType 0 "a"
               OpName %data "data"  ; id %11
               OpName %data "data"  ; id %11
               OpName %RWStructuredBuffer "RWStructuredBuffer"  ; id %17
               OpName %inputBuffer "inputBuffer"  ; id %20
               OpName %inputBuffer "inputBuffer"  ; id %20
               OpName %RWStructuredBuffer_0 "RWStructuredBuffer"  ; id %33
               OpName %outputBuffer "outputBuffer"  ; id %35
               OpName %outputBuffer "outputBuffer"  ; id %35
               OpName %pObj "pObj"  ; id %41
               OpName %pNext "pNext"  ; id %43
               OpName %pNext2 "pNext2"  ; id %46
               OpName %test "test"  ; id %37
               OpName %computeMain "computeMain"  ; id %2
               OpName %MyType_natural "MyType_natural"  ; id %38
               OpMemberName %MyType_natural 0 "a"

               ; Annotations
               OpMemberDecorate %MyType 0 Offset 0
               OpDecorate %_arr_MyType_int_2 ArrayStride 4
               OpDecorate %_runtimearr_float ArrayStride 4
               OpDecorate %RWStructuredBuffer Block
               OpDecorate %RWStructuredBuffer Block
               OpMemberDecorate %RWStructuredBuffer 0 Offset 0
               OpDecorate %inputBuffer Binding 0
               OpDecorate %inputBuffer DescriptorSet 0
               OpDecorate %RWStructuredBuffer_0 Block
               OpDecorate %RWStructuredBuffer_0 Block
               OpMemberDecorate %RWStructuredBuffer_0 0 Offset 0
               OpDecorate %outputBuffer Binding 1
               OpDecorate %outputBuffer DescriptorSet 0
               OpDecorate %_ptr_PhysicalStorageBuffer_MyType_natural ArrayStride 4
               OpDecorate %pObj Aliased
               OpDecorate %_ptr_PhysicalStorageBuffer_float ArrayStride 4
               OpMemberDecorate %MyType_natural 0 Offset 0

               ; Types, variables and constants
       %void = OpTypeVoid
          %3 = OpTypeFunction %void
      %float = OpTypeFloat 32
     %MyType = OpTypeStruct %float
        %int = OpTypeInt 32 1
      %int_2 = OpConstant %int 2
%_arr_MyType_int_2 = OpTypeArray %MyType %int_2
%_ptr_Function__arr_MyType_int_2 = OpTypePointer Function %_arr_MyType_int_2
%_ptr_Function_MyType = OpTypePointer Function %MyType
      %int_0 = OpConstant %int 0
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
%_runtimearr_float = OpTypeRuntimeArray %float
%RWStructuredBuffer = OpTypeStruct %_runtimearr_float
%_ptr_StorageBuffer_RWStructuredBuffer = OpTypePointer StorageBuffer %RWStructuredBuffer
      %int_1 = OpConstant %int 1
       %uint = OpTypeInt 32 0
     %uint_0 = OpConstant %uint 0
%RWStructuredBuffer_0 = OpTypeStruct %_runtimearr_float
%_ptr_StorageBuffer_RWStructuredBuffer_0 = OpTypePointer StorageBuffer %RWStructuredBuffer_0
               OpTypeForwardPointer %_ptr_PhysicalStorageBuffer_MyType_natural PhysicalStorageBuffer
         %40 = OpTypeFunction %float %_ptr_PhysicalStorageBuffer_MyType_natural
       %long = OpTypeInt 64 1
     %long_1 = OpConstant %long 1
%_ptr_PhysicalStorageBuffer_float = OpTypePointer PhysicalStorageBuffer %float
%MyType_natural = OpTypeStruct %float
%_ptr_PhysicalStorageBuffer_MyType_natural = OpTypePointer PhysicalStorageBuffer %MyType_natural
%inputBuffer = OpVariable %_ptr_StorageBuffer_RWStructuredBuffer StorageBuffer
%outputBuffer = OpVariable %_ptr_StorageBuffer_RWStructuredBuffer_0 StorageBuffer

               ; Function computeMain
%computeMain = OpFunction %void None %3
          %4 = OpLabel
       %data = OpVariable %_ptr_Function__arr_MyType_int_2 Function
         %13 = OpAccessChain %_ptr_Function_MyType %data %int_0
         %16 = OpAccessChain %_ptr_StorageBuffer_float %inputBuffer %int_0 %int_0
         %21 = OpLoad %float %16
         %22 = OpCompositeConstruct %MyType %21
               OpStore %13 %22
         %24 = OpAccessChain %_ptr_Function_MyType %data %int_1
         %26 = OpAccessChain %_ptr_StorageBuffer_float %inputBuffer %int_0 %int_1
         %27 = OpLoad %float %26
         %28 = OpCompositeConstruct %MyType %27
               OpStore %24 %28
         %32 = OpAccessChain %_ptr_StorageBuffer_float %outputBuffer %int_0 %uint_0
         %36 = OpFunctionCall %float %test %13
               OpStore %32 %36
               OpReturn
               OpFunctionEnd

               ; Function test
       %test = OpFunction %float None %40
       %pObj = OpFunctionParameter %_ptr_PhysicalStorageBuffer_MyType_natural
         %42 = OpLabel
      %pNext = OpPtrAccessChain %_ptr_PhysicalStorageBuffer_MyType_natural %pObj %long_1
     %pNext2 = OpPtrAccessChain %_ptr_PhysicalStorageBuffer_MyType_natural %pNext %int_1
         %48 = OpAccessChain %_ptr_PhysicalStorageBuffer_float %pNext %int_0
         %49 = OpLoad %float %48 Aligned 4
         %50 = OpLoad %float %48 Aligned 4
         %51 = OpFAdd %float %49 %50
         %52 = OpAccessChain %_ptr_PhysicalStorageBuffer_float %pNext2 %int_0
         %53 = OpLoad %float %52 Aligned 4
         %54 = OpFAdd %float %51 %53
         %55 = OpPtrAccessChain %_ptr_PhysicalStorageBuffer_MyType_natural %pNext2 %int_0
         %56 = OpAccessChain %_ptr_PhysicalStorageBuffer_float %55 %int_0
         %57 = OpLoad %float %56 Aligned 4
         %58 = OpFAdd %float %54 %57
               OpReturnValue %58
               OpFunctionEnd
error: line 88: OpFunctionCall Argument <id> '13[%13]'s type does not match Function <id> '39[%_ptr_PhysicalStorageBuffer_MyType_natural]'s parameter type.
  %36 = OpFunctionCall %float %test %13

(0): internal error 99999: Validation of generated SPIR-V failed.

The error message sounds like there is a problem with how the "storage class" is set for the memory pointer.
"%_ptr_PhysicalStorageBuffer_MyType_natural" uses PhysicalStorageBuffer.
And "%_ptr_Function_MyType" uses Function

Your repro code, we are taking address of a local variable, and this is not allowed.
We can only accept pointers that are defined as shader parameters (e.g. as a constant buffer field), we can produce pointers using the & operator from something that is not in global memory.

In the future, we can extend our legalization passes to properly propagate pointer address space and specialize functions based on the address space of the argument, but this isn't implemented for SPIRV yet.
Our metal backend has logic for propagating and specializing address spaces, and we should generalize that logic to be shared among both spirv and metal backends.
Even when we have the IR pass support, we still want to decide whether or not to expose the ability to take address off a local variable. That usually leads to bad things so my preference is not to allow that.

Your repro code, we are taking address of a local variable, and this is not allowed. We can only accept pointers that are defined as shader parameters (e.g. as a constant buffer field), we can produce pointers using the & operator from something that is not in global memory.

Thank you for the reply.
Based on your comment, I made some adjustment and it started working.
//TEST(compute, vulkan):SIMPLE(filecheck=SPV): -stage compute -entry computeMain -target spirv -emit-spirv-directly

//TEST_INPUT:ubuffer(data=[0], stride=4):out,name=outputBuffer
RWStructuredBuffer<float> outputBuffer;

struct MyType
{
    float a;
};

float test(MyType* pObj)
{
    MyType* pNext = pObj + 1;
    MyType* pNext2 = &pNext[1];
    return pNext.a + pNext->a + (*pNext2).a + pNext2[0].a;
}

cbuffer Constants
{
    MyType *ptr; // <===== pointers defined as shader parameter
};

[numthreads(1,1,1)]
void computeMain()
{
    outputBuffer[0] = test(ptr);
}

It reminded me that Adam put "limitation" to the document, which I forgot to actually read until now.

Slang supports pointers to global memory, but not shared or local memory. For example, it is invalid to define a pointer to a local variable.
Coherent load/stores are unsupported
Custom alignment specification is unsupported.
Slang currently does not support pointers to immutable values, i.e. const T*.

I think we may need to add more to the document to include the information you mentioned.

Slang supports pointers that are defined as shader parameters (e.g. as a constant buffer field)
Slang can produce pointers using the & operator from something that is not in global memory

One thing that is little unclear to me is about the "not in global memory" part.
That sounds conflict to the other statement, "Slang supports pointers to global memory".
I am guessing, the pointer can point "to" global memory, but we cannot "produce" from global memory?
The repro code, which came from the User Guide, has the following line that produces a pointer,
    MyType* pNext2 = &pNext[1];

Isn't the pointer produced from the global memory?
I think pNext[1] without & is on the global memory because ptr from cbuffer was pointing to a global memory.
And an address is produced from pNext[1], which is a global memory, isn't it?

I think you want to say:
Slang can produce pointers using the & operator from things in global memory.

Basically, we have & operator, but the thing after & must be in global memory, and cannot be a local variable.

Closing. The examples are fine. Doc needs to be updated which was done ine #4248


Scenario 2a (beat_var and beta_scale) are missing initial conditions array

For scenario2a, at this line there should be initial conditions for S,V,A,I,R. I believe the parameter values are:
S = 1
V = [V1, V2] = [0,0]
A = 0
I = 1e-6
R = 0.
This is from the MATLAB data provided by the paper author at their GitHub.

Looks like the following are undefined initial conditions that should be included in the AMR:
{'S': 1, 'V1': 0.0, 'V2': 0.0, 'A': 0.0, 'I': 1e-6, 'R': 0.0, 'AR': 0.0, 'IR': 0.0, 'IV': 0.0, 'R2': 0.0, 'SVR': 0.0}
Note: Values are not necessarily correct, but I set them to the best of my understanding of the paper and ASKEM scenario handout.

This is fixed on the hackathon branch. The initials were implemented in my notebook, they just weren't correctly included in the output.


Include missing  header

Otherwise, gcc fails to compile tests/runtime_tests/small_vector.cpp due to the undeclared symbol std::as_const.

Thank you! It must be dependent on the libstdc++ version, since there is a GCC build in the CI and it hasn't picked up on it. Anyway, you're right: this include should be here.


The question about the result of scratch-Pub of MOTA=57.4

Thanks for your great work!
I am a student and doing some experiments on CenterTrack. I can get the correct results of MOTA=63.1(public) and MOTA=66.1(private).
But I can't get the MOTA=57.4 of scratch-Pub in Table 9.
I am using this script, loading the model named " mot17_half_sc.pth ":
python test.py tracking --exp_id mot17_half_sc --dataset mot --dataset_version 17halfval --pre_hm --ltrb_amodal --track_thresh 0.4 --pre_thresh 0.5 --load_model ../mot17_half_sc.pth

Am I using the correct script to get the result of MOTA=57.4? Could you please help me with this?

When I do some tests, I find the track_thresh is essential. In this paper, track_thresh is set 0.4 according to Table 11. But I find track_thresh=0.3 or track_thresh=0.2 can get the higher result of MOTA, why do you choose track_thresh=0.4 other than 0.2 or 0.3?

How can I choose the proper track_thresh on my own trained model? Do I have to set the same track_thresh when I compare my method to CenterTrack, which my method modify based on CenterTrack?

Thank you very much!

Hi,
Thank you for your questions.

It should be correct as far as I can see. What is the number you get from that? I didn't carefully check the numbers in the supplement table before code release. The paper numbers might be from another model. What you get from the code should be correct.
I observed this too as is ablated in supplement Table. 11 I use 0.4 as swept in Table 11.
You should probably search for the optimal threshold for your data on your validation set ...

I get MOTA=58.0 .
Thanks for your kind reply!!


server channel webhook created (test)

testing the webhook

webhook to channel is not working. Not sure the problem.


Bug: can't use iterator value in for loop

I can't use the i variable in this for loop example:
for i, nav := range navs {
  if nav.Active {
    { nav.Text }
  }
}

func navId(i int) {
  return fmt.Sprintf("navid-%d", i)
}

Error:
i declared and not used

Thank you, great project by the way. I'll use the classic for loop for now.

Hi @adonespitogo I'm taking a look at this. What version of templ are you using please?

Second, what command are you running to see this error? Or is it in the editor?

Hi @joerdav

Hi @adonespitogo I'm taking a look at this. What version of templ are you using please?

v0.2.707

Second, what command are you running to see this error? Or is it in the editor?

cd templates && templ generate

I'm struggling to reproduce this, your original code is not valid templ so I couldn't just copy it into a file. I changed it into a valid templ file and couldn't get it to error:
package adon

templ t() {
	for i, nav := range navs {
		if nav.Active {
			{ nav.Text }
		}
	}
}

func navId(i int) {
	return fmt.Sprintf("navid-%d", i)
}

Please can you consider creating a minimal reproducible example, either as a github repo or a single templ file that I can copy?

Hi @joerdav
I can no longer reproduce this issue. Perhaps it was a mistake on my part, a lot has changed in my code since then. Sorry for bringing this up. Feel free to close this issue.

No problem, thanks for coming back to update!


Typing with IME (Chinese characters) breaks on the first character

Thank you for your lightweight editor, we only have one problem with it.
When you type Chinese characters the typing method somehow always breaks after the first character. It happens only on Chrome as far as we tested.
For example in the screenshot, I want the character 請, but the first q disrupted IME, so only ing is left.

operating system: macOS High Sierra 10.13.4
browser: Google Chrome 65

Thanks for the issue, though this is super specific and I have zero experience with non-English input, perhaps try checking out the very small source code file to pinpoint what's going on for that use case.


whats is the properties of a semi colon in the color change text

Challenge Name

Issue Description

Browser Information

Browser Name, Version:
Operating System:
Mobile, Desktop, or Tablet:

Your Code

Screenshot

Please describe how to reproduce this issue, and include links to screenshots if possible.

Happy Coding


Thwomps Can Get Stuck in Portals

A Thwomp going through a Portal which has its exit facing the same way as its entrance will get stuck oscillating very quickly between the two portals. This is because the Thwomp's trajectory isn't being redirected by the Portal. In this screenshot for example, the Thwomp was going to the left when entering the blue portal. When exiting from the orange portal, the Thwomp kept trying to go left, thus instantly re-entering the portal. This happens with Thwomps going any direction, but looks the weirdest with Thwomps getting back from an attack. When they're attacking, they have enough momentum going through the portal to prevent them from weirdly oscillating at the portal entrance. The solution would be to change the Thwomp's trajectory to match the direction of the exit portal.

Didn't quite make them change trajectory, but I made sideways thwomps more consistent with how normal thwomps behave with portals
ca23f2a1d3fe71c0cb92998a612dcf2a4abcc69c


New actively maintained integration! Collaborators welcome! Details inside.

What Happened?
I've created a new Github organization, The libdyson Working Group and published updated versions of libdyson, ha-dyson, and ha-dyson-cloud. The new forks are actively maintained, and I would be excited to talk with any contributors about joining the organization.
I'm currently working on merging all the commits from Pull Requests, then I'll address all the Issues. There are a few conflicts in the Pull Requests regarding newer devices (Formaldehyde fans/heaters, Humidifiers, and refreshes like the HP07 refresh of the HP04). For the time being, Formaldehyde models are the next on my list of things to tackle.
How can I help?
Anyone interested in helping, even if it's just reviewing and merging Pull Requests, please let me know here in this thread, or via email (ben+libdyson@vez.email)!
Why Fork?
I'm really grateful to @shenxn for their dedication to the project over the years. Sadly, they've been pretty quiet for the past 4~5 months and the integration has started breaking for some people, especially people using new unsupported devices. Eventually, it seemed appropriate to talk about making a community fork to keep things moving.
I especially want to make sure there's at least two people who can merge Pull Requests. This isn't the biggest repo in the world, but it is used by people and gives us some really nice features that are otherwise impossible to access. So I want to make sure all of us continue to have that.
What are the goals?
Primarily, just to keep this working and maintained. I'd personally like to make the integrations and library easier to use, and I'm open to any kind of improvements that the community might have - PR's welcome! Other than that, my short term goals over the next few days are:

Finish merging all the PR's from the past few months to add support for new devices, features for vacuums. This is partially complete right now.
Get Formaldehyde, Humidifier, and other new models working and reporting the correct information.

There are some PRs, but Dyson is being weird and giving different models the same Device ID's which confuses the logic of libdyson right now.

Done: Work with Github support to remove the Fork status so that the new repos can have their own dedicated Issues tracker.
Get some more members on the working group to ensure PRs get merged quickly and updates happen.
Try my best to help people get migrated if they need to.

If you have issues: https://github.com/libdyson-wg/ha-dyson-cloud/issues

How do I switch from @shenxn's repos to the new repos?
Experimental no-reconfiguration swap
I haven't tested this method very much, but in my experiments it seems possible to switch over with zero impact to your current integration configuration, entities/devices, or dashboards. I don't know what side-effects it may have though (leftover old config data might start causing issues or something - no guarantees).

Remove the ha-dyson and ha-dyson-cloud custom repositories from HACS

Without removing the integrations themselves.

Add the new ha-dyson and ha-dyson-cloud custom repositories

The ha-dyson-cloud repository is only necessary if you already use it, or are intending to use its features. It is not required, but currently, it makes setting up new devices like HP07 (527K) much simpler.

Update the ha-dyson and ha-dyson-cloud repositories using the HACS updater

Proven some-reconfiguration swap
This is proven to work without any side effects. If you used the default IDs for the entities and devices, then you'll just need to re-configure the devices but your dashboards will not need updating.

Remove the Dyson Local and Dyson Cloud integrations from your /config/integrations page.
Remove the Dyson Local and Dyson Cloud integrations from your /hacs/integrations page.
Remove the dyson-ha and dyson-ha-cloud custom repositories from HACS
Add the new dyson-ha and dyson-ha-cloud custom repositories

The libdyson-ha-cloud repository is only necessary if you already use it, or are intending to use its features. It is not required, but currently, it makes setting up new devices like HP07 (527K) much simpler.

Update the dyson-ha and dyson-ha-cloud repositories

That should be it! But if you have any issues doing this, please share: https://github.com/libdyson-wg/ha-dyson-cloud/issues

Hi, I have downloaded the new repositories, installed both and re-booted after each install, I start the cloud integration, it asks for my country I say UK, the on entering my email address I get this?

Any clue? Thanks.

Hi @itnassol! That's actually a known issue on the old repo as well. There's a note on the Readme and also some [more details on the new repo](

Brilliant thank you, all showing up, if you need me to try anything here, just shout as I have 3 different models and another 3 coming online this year, this is all part of a big project so just shout of you want me to test anything. Thanks again.

Ooops, I meant to keep this open for visibility. Reopening.


Fixed the fix - color_mode should not be a set.

Also, bool comparisons with None is risky (e.g. a dimmable light with 0 brighness would suddenly stop being registered as dimmable), so fixed that as well.

Thank you, Luca. I'm going to fix the unit test.


Add dynamic port selection to several tests

What is this pull request?
This pull request removes hardcoded ports from several test classes, and replaces them with dynamic port selection
Why do you implement it? Why do we need this pull request?
Hardcoded ports can be already taken by something else, which produces test failure. Such a failure is hard to detect and reproduce, so it is best to avoid such issues.
Details/Features
List of features / major commits

Add dynamic ports to block_loader_test and ordering_gate_test

P.S. (optional)
I was not able to change several tests, because address needs to be known beforehand for them to work. This means that adding dynamic port requires major changes in core classes.

Codecov Report

Merging #778 into trunk/shared_model will decrease coverage by <.01%.
The diff coverage is 0%.

@@                  Coverage Diff                   @@
##           trunk/shared_model     #778      +/-   ##
======================================================
- Coverage               41.19%   41.18%   -0.01%
======================================================
  Files                     430      430
  Lines                   13884    13885       +1
  Branches                 7468     7469       +1
======================================================
  Hits                     5719     5719
  Misses                   1577     1577
- Partials                 6588     6589       +1

Impacted Files
Coverage Δ

test/module/irohad/ordering/ordering_gate_test.cpp
26.19% <0%> (-0.64%)
:arrow_down:

test/module/irohad/network/block_loader_test.cpp
21.17% <0%> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 62931e0...358d0a2. Read the comment docs.

https://soramitsu.atlassian.net/browse/IR-741

Pls, fix the build. After it, I will approve changes.


Error with file type field

I created a file type field:
        'file' => [             'field' => 'file',             'display_name' => 'PDF File',             'partial' => 'voyager::formfields.file',             'required' => 0         ],
When saving a file, the following error appears:
Trying to get property 'download_link' of non-object (View: /var/www/vendor/tcg/voyager/resources/views/formfields/file.blade.php) (View: /var/www/vendor/tcg/voyager/resources/views/formfields/file.blade.php) (View: /var/www/vendor/tcg/voyager/resources/views/formfields/file.blade.php) Previous exceptions Trying to get property 'download_link' of non-object (View: /var/www/vendor/tcg/voyager/resources/views/formfields/file.blade.php) (View: /var/www/vendor/tcg/voyager/resources/views/formfields/file.blade.php) (0) Trying to get property 'download_link' of non-object (View: /var/www/vendor/tcg/voyager/resources/views/formfields/file.blade.php) (0) Trying to get property 'download_link' of non-object (0)
In the file file.blade.php I found the cause of the error:
Storage::disk(config('voyager.storage.disk'))->url($file->download_link) ?: ''
$file->download_link it's a string, not an object.
I can correct this error in the file, but I do not think this is correct and the problem will appear every time the composer is updated.
What should I do with this error next?

Tell me where you can read the documentation on all available fields and their options?

Voyager's in-built fields won't always be appropriate.
Try changing your file type field to something like: 'file' => [ 'field' => 'file', 'display_name' => 'PDF File', 'partial' => 'formfields.custom_file', 'required' => 0 ]
Then set up your own, custom form field in resources/formfields/custom_file.blade.php .
This way you can avoid the properties / methods we don't supply.
You can also modify the Blocks.php trait in your own branch to support file uploads that preserve the properties like 'download_link' and 'original_name' - here's a loosely adapted version from 'uploadImages' that might work for you (this will allow you to use the original file.blade.php from Voyager's src, minus the lines using ->getKey())
    public function uploadFiles(Request $request, array $data): array
    {
        $index = 0;
        foreach ($request->files as $key => $field) {
            if (is_array($request->file($key))) {
                $multiFiles = array();
                foreach ($request->file($key) as $key2 => $file) {
                    $filePath = $file->store('public/blocks');

                    $multiFiles[$index]['download_link'] = str_replace('public/', '', $filePath);
                    $multiFiles[$index]['original_name'] = $file->getClientOriginalName();
                }
                $data[$key] = json_encode($multiImages);
            } else {
                $filePath = $request->file($key)->store('public/blocks');
                $data[$key][$index]['download_link'] = str_replace('public/', '', $filePath);
                $data[$key][$index]['original_name'] = $field->getClientOriginalName();
            }
            $index++;
        }
        return $data;
    }


way faster constructor

Maybe I misunderstood, reduce looks like it's for restoring the type. If the type is determined at the beginning, then there is no need to call reduce.
julia> data_1 = rand(30,20);

julia> data_2 = rand(30,20);

julia> @benchmark ComponentArray(a = $data_1, b = $data_2) # Original
BenchmarkTools.Trial: 8075 samples with 1 evaluation.
 Range (min … max):  372.000 μs …   5.988 ms  ┊ GC (min … max):  0.00% … 90.97%
 Time  (median):     451.300 μs               ┊ GC (median):     0.00%
 Time  (mean ± σ):   615.631 μs ± 819.858 μs  ┊ GC (mean ± σ):  25.07% ± 16.55%

  ██▄▃▁                                                     ▁ ▁ ▂
  █████▇▆▅▃▅▄▄▄▁▃▁▃▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▅████ █
  372 μs        Histogram: log(frequency) by time          5 ms <

 Memory estimate: 2.96 MiB, allocs estimate: 2442.

julia>  @benchmark ComponentArray(a = $data_1, b = $data_2) # This PR
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
 Range (min … max):   9.400 μs …  1.983 ms  ┊ GC (min … max): 0.00% … 98.03%
 Time  (median):     11.100 μs              ┊ GC (median):    0.00%
 Time  (mean ± σ):   13.263 μs ± 49.256 μs  ┊ GC (mean ± σ):  9.68% ±  2.60%

     ▅▆▇▇█▆▆▅▅▂▂▁▁▂▁▂▃▂▂▂▃▁▂▁▂▁▁                              ▂
  ▂▃███████████████████████████████▇▇▇▅▆▇▇▆▆▆▇▆▆▆▆▃▄▅▅▅▅▄▆▅▄▅ █
  9.4 μs       Histogram: log(frequency) by time      22.7 μs <

 Memory estimate: 32.77 KiB, allocs estimate: 43.

Codecov Report

Merging #157 (30aa369) into master (f3a1b6d) will decrease coverage by 0.34%.
The diff coverage is 90.90%.

:exclamation: Current head 30aa369 differs from pull request most recent head 6313e5c. Consider uploading reports for the commit 6313e5c to get more accurate results

@@            Coverage Diff             @@
##           master     #157      +/-   ##
==========================================
- Coverage   76.62%   76.27%   -0.35%
==========================================
  Files          20       20
  Lines         586      590       +4
==========================================
+ Hits          449      450       +1
- Misses        137      140       +3

Impacted Files
Coverage Δ

src/utils.jl
90.32% <75.00%> (-5.98%)
:arrow_down:

src/componentarray.jl
82.25% <100.00%> (+0.29%)
:arrow_up:

src/similar_convert_copy.jl
82.50% <0.00%> (-2.50%)
:arrow_down:

src/array_interface.jl
81.91% <0.00%> (-1.25%)
:arrow_down:

src/show.jl
3.92% <0.00%> (+0.07%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us.

The current method of creating a component array from a nested dict is a little strange, I think it's better to convert the dict into a named tuple first.

New benchmark
julia> @benchmark ComponentArray(a = $data_1, b = $data_2)
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
 Range (min … max):   9.600 μs …  4.390 ms  ┊ GC (min … max):  0.00% … 99.16%
 Time  (median):     15.950 μs              ┊ GC (median):     0.00%
 Time  (mean ± σ):   20.259 μs ± 97.878 μs  ┊ GC (mean ± σ):  13.10% ±  2.95%

  ▂▇█▅▅▅▅▇▇▇▆▄▃▁▁           ▁▁▁▁  ▁▁▁▂▁                       ▂
  ███████████████████▇█▇▇▇████████████████▆▅▅▄▄▄▃▅▅▅▇▆▆▆▅▇▆▅▆ █
  9.6 μs       Histogram: log(frequency) by time      59.6 μs <

 Memory estimate: 42.25 KiB, allocs estimate: 43.

This change seems to have broken https://github.com/avik-pal/Lux.jl/runs/7702517164?check_suite_focus=true. @jonniedie could we add a downstream test dep on Lux similar to https://github.com/avik-pal/Lux.jl/blob/main/.github/workflows/Downstream.yml?

You have some overloading there, I think it's time to upstream them instead.

@avik-pal yeah, that’s a good idea. And it would also be a good idea to upstream whatever Lux is overloading as well.

I will do it.
This line is very domain specific @avik-pal, it could cause strange behaviour. Not so sure what is the motivation of it.
julia> ComponentArray(a=Int[], b=(;))
ComponentVector{Float32}(a = Float32[], b = Float32[])

julia> ComponentArray(a=Int[1], b=(;))
ComponentVector{Int64}(a = [1], b = Int64[])

I think at some point it would lead to a ComponentVector{Any} which is why I had that hacky thing. We should be able to remove that without any trouble

Not sure if this PR would satisfy your requirement

Yeah it should do it https://github.com/avik-pal/Lux.jl/pull/126


Add panoramas to the new schema

Successor to: https://github.com/WillNilges/meshdb/pull/216

should probably address comments from: https://github.com/WillNilges/meshdb/pull/216

Also we should look at Network Number and fall back to Install Number

maybe I need to add tests for hourly celery and for the new panorama upsert logic


Covariance matrix calculation

In theory there are two ways to do the covariance matrix calculation:

Poisson covariance matrix calculation
Multinomial covariance matrix calculation

Both these methods are implemented in PyUnfold. However, we currently have the CovarianceMatrix class hard coded to only ever use the multinomial covariance calculation.
https://github.com/jrbourbeau/pyunfold/blob/0a9724b119ad6038b192a63194cff70f2ff6bc21/pyunfold/mix.py#L115-L116
I propose we either:

Add this as a parameter to iterative_unfold so users can choose between  "Multinomial" or "Poisson"
Drop the Poisson covariance calculation if the existing hard coding of self.pec_cov_type = "Multinomial" is there for a good reason.

What are your thoughts on this @zhampel?

Yeah, I've thought about this in the past as well. The problem is that when simulating a response matrix, you have a fixed number of events falling into a true cause bin. This requires us to use the multinomial form for the covariance matrix. I had left the Poisson there in the case that somehow one could construct the response matrix in a manner that permitted the Poisson form of the covariance calculation. Perhaps we should discuss with Mickael Kuusela to see if he has any suggestions regarding this. For now, is it ok to leave the hard coded version till we have a clearer view?

Thinking about it a little more, perhaps it's even worth it to include a multinomial version of the covariance calculation for the measured data as well. That was it's complete. Again, I'll have to check with M. Kuusela if he can come up with some examples of when one might use these options. But with this in mind, I think we should go with your first option and make these input parameters to iterative_unfold.

Can do, thanks for the feedback Zig.
I have a similar question regarding the Adye error propagation corrections. Right now the default value is error_type='ACM' (i.e. Adye corrections are used). We could:

Add a parameter to iterative_unfold to specify whether or not to use these corrections or
Could just always use them

Hmmm... Technically the D'Agostini cov calc is not correct, but a first iteration approximation. The only issue I forsee is that for some huge number of causes, or a large set of blocks, the full uncertainty propagation calculation could potentially take a long time and bog down the unfolding. Yet, at the same time, the Adye way is the correct way. I say we can just always use the correct version, so your option 2. Do you also agree?

I agree with you. I'll remove the D'Agostini cov calculation and just keep the Adye version. I think it would be premature to worry much about the speed of unfolding for large number of cause bins at this point.
P.S. I'm thinking about trying to use cython to try and speed up some of the for-loops here anyways.


Better error handling for invalid response

The xml-rpc API in WordPress produces invalid responses (usually a html error page) under certain error conditions. In those cases, access to the actual response would be very valuable to debug the issue. Currently all we get is something like Unknown XML-RPC tag 'TITLE'.
Would be used in https://github.com/scottgonzalez/node-wordpress and https://github.com/scottgonzalez/grunt-wordpress

LOL


[BUG] Bridge not found on Philips Android Ambilight TV

Describe the bug
When I try to connect this emulated bridge with my Ambilight Philips Android TV, you can't select the lights you want to use for the entertainment mode, instead EmulatedHue throws an exception.
Steps to Reproduce

On Android TV (with Philips Ambilight) goto Settings -> Ambilight + Hue -> Setup
Select Home Assistant (the Emulated Bridge) as the Bridge
TV shows dialog to confirm settings with bridge button press
Notification in HomeAssistant, with working link to click emulated button
TV accepts button press and goes to next screen where you can usually select the lights you want to use, but instead there's a text saying "No bridge"
EmulatedHue throws exceptions

Expected behavior

Logs
2021-01-07 23:31:40,444 INFO  emulated_hue.config -- Auto detected listen IP address is <IP_ADDRESS>
2021-01-07 23:31:40,476 INFO  hass-client -- Connecting to hassio/homeassistant
2021-01-07 23:31:40,480 INFO  emulated_hue.api -- Started HTTP webserver on port 80
2021-01-07 23:31:40,497 INFO  hass-client -- Connected to hassio/homeassistant
2021-01-07 23:31:40,574 INFO  emulated_hue.api -- Started HTTPS webserver on port 443
2021-01-07 23:34:18,044 INFO  emulated_hue.config -- Link request detected - Use the Homeassistant frontend to confirm this link request.
2021-01-07 23:34:21,862 INFO  emulated_hue.config -- Link mode is enabled for the next 5 minutes.
2021-01-07 23:34:21,871 INFO  emulated_hue.api -- Client 55PUS7354/12 registered
2021-01-07 23:34:21,914 ERROR aiohttp.server -- Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/app/emulated_hue/api.py", line 89, in wrapped_func
    return await func(cls, request)
  File "/app/emulated_hue/api.py", line 460, in get_full_state
    "lights": await self.__async_get_all_lights(),
  File "/app/emulated_hue/api.py", line 768, in __async_get_all_lights
    result[light_id] = await self.__async_entity_to_hue(entity, light_config)
  File "/app/emulated_hue/api.py", line 753, in __async_entity_to_hue
    for key, value in device["identifiers"]:
ValueError: too many values to unpack (expected 2)
2021-01-07 23:34:25,924 INFO  emulated_hue.api -- Stop Entertainment mode for group 6 - params: {'stream': {'active': False}}
2021-01-07 23:34:25,944 INFO  emulated_hue.entertainment -- Start HUE Entertainment Service on UDP port 2100.
2021-01-07 23:34:26,166 ERROR aiohttp.server -- Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/app/emulated_hue/api.py", line 89, in wrapped_func
    return await func(cls, request)
  File "/app/emulated_hue/api.py", line 460, in get_full_state
    "lights": await self.__async_get_all_lights(),
  File "/app/emulated_hue/api.py", line 768, in __async_get_all_lights
    result[light_id] = await self.__async_entity_to_hue(entity, light_config)
  File "/app/emulated_hue/api.py", line 753, in __async_entity_to_hue
    for key, value in device["identifiers"]:
ValueError: too many values to unpack (expected 2)
2021-01-07 23:39:21,864 INFO  emulated_hue.config -- Link mode is disabled.

Hardware Info:

Architecture: x86_64 (HomeAssistant in VM)
Addon version: 0.0.11 stable
OS: Official Home Assistant ISO (Linux)
Hardware: PC

Thanks in advance for your help :)

What lights are you using? Looks to be an error parsing the metadata from the lights. Does the official Hue app or any Hue apps work?

I will test that now, I just noticed that this could be a simple python error (dictionaries are unpacked using dict.items() in order to get key and value => the expected 2 items to unpack). I try fixing that and see if it will work

If you would be able to debug python to show what is stored within "device" that would be helpful. If you don't want to setup your dev environment, you could also simply log "device" and post the value here. The dev addon should allow you to use your own fork for testing purposes by doing username:branch.

If you would be able to debug python to show what is stored within "device" that would be helpful. If you don't want to setup your dev environment, you could also simply log "device" and post the value here. The dev addon should allow you to use your own fork for testing purposes by doing username:branch.

This is the output I get:
2021-01-08 14:21:32,028 INFO  emulated_hue.api -- - Device: {'config_entries': ['xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'], 'connections': [], 'manufacturer': 'Yeelight Technology', 'model': 'YLDP15YL', 'name': 'YLBulb1S(Dimmable)-FEE7', 'sw_version': '2.0.10', 'entry_type': None, 'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'identifiers': [['homekit_controller', 'accessory-id', 'XX:XX:XX:XX:XX:XX'], ['homekit_controller', 'serial-number', 'XXXXXXXXX']], 'via_device_id': None, 'area_id': None, 'name_by_user': 'Deckenlampe 2', 'disabled_by': None}
2021-01-08 14:21:32,028 ERROR  emulated_hue.api -- too many values to unpack (expected 2)
2021-01-08 14:21:32,029 INFO  emulated_hue.api -- - Device: {'config_entries': ['xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'], 'connections': [], 'manufacturer': 'Yeelight Technology', 'model': 'YLDP15YL', 'name': 'YLBulb1S(Dimmable)-398A', 'sw_version': '2.0.10', 'entry_type': None, 'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'identifiers': [['homekit_controller', 'serial-number', 'XXXXXXXXX'], ['homekit_controller', 'accessory-id', 'XX:XX:XX:XX:XX:XX']], 'via_device_id': None, 'area_id': None, 'name_by_user': 'Deckenlampe 1', 'disabled_by': None}
2021-01-08 14:21:32,029 ERROR  emulated_hue.api -- too many values to unpack (expected 2)
2021-01-08 14:21:32,029 INFO  emulated_hue.api -- - Device: {'config_entries': ['xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'], 'connections': [], 'manufacturer': 'Yeelight Technology', 'model': 'YLDP13YL', 'name': 'YLBulbColor1s-672E', 'sw_version': '2.0.31', 'entry_type': None, 'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'identifiers': [['homekit_controller', 'serial-number', 'XXXXXXXXX'], ['homekit_controller', 'accessory-id', 'XX:XX:XX:XX:XX:XX']], 'via_device_id': None, 'area_id': None, 'name_by_user': 'Unbenutzt RGB', 'disabled_by': None}
2021-01-08 14:21:32,030 ERROR  emulated_hue.api -- too many values to unpack (expected 2)
2021-01-08 14:21:32,030 INFO  emulated_hue.api -- - Device: {'config_entries': ['xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'], 'connections': [], 'manufacturer': 'Yeelight Technology', 'model': 'YLDP13YL', 'name': 'YLBulbColor1s-DD83', 'sw_version': '2.0.30', 'entry_type': None, 'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'identifiers': [['homekit_controller', 'serial-number', 'XXXXXXXXX'], ['homekit_controller', 'accessory-id', 'XX:XX:XX:XX:XX:XX']], 'via_device_id': None, 'area_id': None, 'name_by_user': 'Sofalampe', 'disabled_by': None}
2021-01-08 14:21:32,030 ERROR  emulated_hue.api -- too many values to unpack (expected 2)
2021-01-08 14:21:32,031 INFO  emulated_hue.api -- - Device: {'config_entries': ['xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'], 'connections': [], 'manufacturer': 'Yeelight Technology', 'model': 'YLDP13YL', 'name': 'YLBulbColor1s-49D7', 'sw_version': '2.0.31', 'entry_type': None, 'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'identifiers': [['homekit_controller', 'serial-number', 'XXXXXXXXX'], ['homekit_controller', 'accessory-id', 'XX:XX:XX:XX:XX:XX']], 'via_device_id': None, 'area_id': None, 'name_by_user': 'Stehlampe', 'disabled_by': None}
2021-01-08 14:21:32,031 ERROR  emulated_hue.api -- too many values to unpack (expected 2)
2021-01-08 14:21:32,031 INFO  emulated_hue.api -- - Device: {'config_entries': ['xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'], 'connections': [], 'manufacturer': 'Yeelight Technology', 'model': 'YLDP13YL', 'name': 'YLBulbColor1s-4768', 'sw_version': '2.0.31', 'entry_type': None, 'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'identifiers': [['homekit_controller', 'serial-number', 'XXXXXXXXX'], ['homekit_controller', 'accessory-id', 'XX:XX:XX:XX:XX:XX']], 'via_device_id': None, 'area_id': None, 'name_by_user': 'Bettlampe', 'disabled_by': None}
2021-01-08 14:21:32,031 ERROR  emulated_hue.api -- too many values to unpack (expected 2)
2021-01-08 14:21:32,032 INFO  emulated_hue.api -- - Device: {'config_entries': ['xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'], 'connections': [], 'manufacturer': 'Yeelight Technology', 'model': 'YLDP15YL', 'name': 'YLBulbWhite1S-FC33', 'sw_version': '1.3.7', 'entry_type': None, 'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'identifiers': [['homekit_controller', 'serial-number', 'XXXXXXXXX'], ['homekit_controller', 'accessory-id', 'XX:XX:XX:XX:XX:XX']], 'via_device_id': None, 'area_id': None, 'name_by_user': 'Deckenlampe 3', 'disabled_by': None}
2021-01-08 14:21:32,032 ERROR  emulated_hue.api -- too many values to unpack (expected 2)
2021-01-08 14:21:32,032 INFO  emulated_hue.api -- - Device: {'config_entries': ['xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'], 'connections': [], 'manufacturer': 'WLED', 'model': 'FOSS', 'name': 'WLED', 'sw_version': '0.11.1', 'entry_type': None, 'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'identifiers': [['wled', 'xxxxxxxxxxxx']], 'via_device_id': None, 'area_id': None, 'name_by_user': None, 'disabled_by': None}

I modified the method async def __async_entity_to_hue and changed this:
if reg_entity and reg_entity["device_id"] is not None:
            device = self.hass.device_registry.get(reg_entity["device_id"])

            LOGGER.info(f"- Device: {device}")

            if device:
                retval["manufacturername"] = device["manufacturer"]
                retval["modelid"] = device["model"]
                retval["productname"] = device["name"]
                if device["sw_version"]:
                    retval["swversion"] = device["sw_version"]
                if device["identifiers"]:
                    # prefer real zigbee address if we have that
                    # might come in handy later when we want to
                    # send entertainment packets to the zigbee mesh
                    try:
                        for key, value in device["identifiers"]:
                            if key == "zha":
                                retval["uniqueid"] = value
                    except Exception as e:
                        LOGGER.info(e)

        return retval

It actually works now (at least in Hue Essentials)(don't know why it hadn't worked yesterday with the changes I made), but in Hue Essentials, all Lights show up as question mark, while all the  lights created by home assistant have a hue light icon

This is the output I get:
2021-01-08 14:21:32,028 INFO  emulated_hue.api -- - Device: {'config_entries': ['xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'], 'connections': [], 'manufacturer': 'Yeelight Technology', 'model': 'YLDP15YL', 'name': 'YLBulb1S(Dimmable)-FEE7', 'sw_version': '2.0.10', 'entry_type': None, 'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'identifiers': [['homekit_controller', 'accessory-id', 'XX:XX:XX:XX:XX:XX'], ['homekit_controller', 'serial-number', 'XXXXXXXXX']], 'via_device_id': None, 'area_id': None, 'name_by_user': 'Deckenlampe 2', 'disabled_by': None}
2021-01-08 14:21:32,028 ERROR  emulated_hue.api -- too many values to unpack (expected 2)
2021-01-08 14:21:32,029 INFO  emulated_hue.api -- - Device: {'config_entries': ['xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'], 'connections': [], 'manufacturer': 'Yeelight Technology', 'model': 'YLDP15YL', 'name': 'YLBulb1S(Dimmable)-398A', 'sw_version': '2.0.10', 'entry_type': None, 'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'identifiers': [['homekit_controller', 'serial-number', 'XXXXXXXXX'], ['homekit_controller', 'accessory-id', 'XX:XX:XX:XX:XX:XX']], 'via_device_id': None, 'area_id': None, 'name_by_user': 'Deckenlampe 1', 'disabled_by': None}
2021-01-08 14:21:32,029 ERROR  emulated_hue.api -- too many values to unpack (expected 2)
2021-01-08 14:21:32,029 INFO  emulated_hue.api -- - Device: {'config_entries': ['xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'], 'connections': [], 'manufacturer': 'Yeelight Technology', 'model': 'YLDP13YL', 'name': 'YLBulbColor1s-672E', 'sw_version': '2.0.31', 'entry_type': None, 'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'identifiers': [['homekit_controller', 'serial-number', 'XXXXXXXXX'], ['homekit_controller', 'accessory-id', 'XX:XX:XX:XX:XX:XX']], 'via_device_id': None, 'area_id': None, 'name_by_user': 'Unbenutzt RGB', 'disabled_by': None}
2021-01-08 14:21:32,030 ERROR  emulated_hue.api -- too many values to unpack (expected 2)
2021-01-08 14:21:32,030 INFO  emulated_hue.api -- - Device: {'config_entries': ['xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'], 'connections': [], 'manufacturer': 'Yeelight Technology', 'model': 'YLDP13YL', 'name': 'YLBulbColor1s-DD83', 'sw_version': '2.0.30', 'entry_type': None, 'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'identifiers': [['homekit_controller', 'serial-number', 'XXXXXXXXX'], ['homekit_controller', 'accessory-id', 'XX:XX:XX:XX:XX:XX']], 'via_device_id': None, 'area_id': None, 'name_by_user': 'Sofalampe', 'disabled_by': None}
2021-01-08 14:21:32,030 ERROR  emulated_hue.api -- too many values to unpack (expected 2)
2021-01-08 14:21:32,031 INFO  emulated_hue.api -- - Device: {'config_entries': ['xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'], 'connections': [], 'manufacturer': 'Yeelight Technology', 'model': 'YLDP13YL', 'name': 'YLBulbColor1s-49D7', 'sw_version': '2.0.31', 'entry_type': None, 'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'identifiers': [['homekit_controller', 'serial-number', 'XXXXXXXXX'], ['homekit_controller', 'accessory-id', 'XX:XX:XX:XX:XX:XX']], 'via_device_id': None, 'area_id': None, 'name_by_user': 'Stehlampe', 'disabled_by': None}
2021-01-08 14:21:32,031 ERROR  emulated_hue.api -- too many values to unpack (expected 2)
2021-01-08 14:21:32,031 INFO  emulated_hue.api -- - Device: {'config_entries': ['xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'], 'connections': [], 'manufacturer': 'Yeelight Technology', 'model': 'YLDP13YL', 'name': 'YLBulbColor1s-4768', 'sw_version': '2.0.31', 'entry_type': None, 'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'identifiers': [['homekit_controller', 'serial-number', 'XXXXXXXXX'], ['homekit_controller', 'accessory-id', 'XX:XX:XX:XX:XX:XX']], 'via_device_id': None, 'area_id': None, 'name_by_user': 'Bettlampe', 'disabled_by': None}
2021-01-08 14:21:32,031 ERROR  emulated_hue.api -- too many values to unpack (expected 2)
2021-01-08 14:21:32,032 INFO  emulated_hue.api -- - Device: {'config_entries': ['xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'], 'connections': [], 'manufacturer': 'Yeelight Technology', 'model': 'YLDP15YL', 'name': 'YLBulbWhite1S-FC33', 'sw_version': '1.3.7', 'entry_type': None, 'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'identifiers': [['homekit_controller', 'serial-number', 'XXXXXXXXX'], ['homekit_controller', 'accessory-id', 'XX:XX:XX:XX:XX:XX']], 'via_device_id': None, 'area_id': None, 'name_by_user': 'Deckenlampe 3', 'disabled_by': None}
2021-01-08 14:21:32,032 ERROR  emulated_hue.api -- too many values to unpack (expected 2)
2021-01-08 14:21:32,032 INFO  emulated_hue.api -- - Device: {'config_entries': ['xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'], 'connections': [], 'manufacturer': 'WLED', 'model': 'FOSS', 'name': 'WLED', 'sw_version': '0.11.1', 'entry_type': None, 'id': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'identifiers': [['wled', 'xxxxxxxxxxxx']], 'via_device_id': None, 'area_id': None, 'name_by_user': None, 'disabled_by': None}

I modified the method async def __async_entity_to_hue and changed this:
if reg_entity and reg_entity["device_id"] is not None:
            device = self.hass.device_registry.get(reg_entity["device_id"])

            LOGGER.info(f"- Device: {device}")

            if device:
                retval["manufacturername"] = device["manufacturer"]
                retval["modelid"] = device["model"]
                retval["productname"] = device["name"]
                if device["sw_version"]:
                    retval["swversion"] = device["sw_version"]
                if device["identifiers"]:
                    # prefer real zigbee address if we have that
                    # might come in handy later when we want to
                    # send entertainment packets to the zigbee mesh
                    try:
                        for key, value in device["identifiers"]:
                            if key == "zha":
                                retval["uniqueid"] = value
                    except Exception as e:
                        LOGGER.info(e)

        return retval

It actually works now (at least in Hue Essentials)(don't know why it hadn't worked yesterday with the changes I made), but in Hue Essentials, all Lights show up as question mark, while all the  lights created by home assistant have a hue light icon

Perfect! Looks like the device information is passed through as a list instead of a dictionary, so we will need to concatenate all values up to the last value in the list which we will expose.
'identifiers':[
[
'homekit_controller',
'accessory-id',
'XX:XX:XX:XX:XX:XX'
],
[
'homekit_controller',
'serial-number',
'XXXXXXXXX'
]
]

Perfect! Looks like the device information is passed through as a list instead of a dictionary, so we will need to concatenate all values up to the last value in the list which we will expose.
'identifiers':[
[
'homekit_controller',
'accessory-id',
'XX:XX:XX:XX:XX:XX'
],
[
'homekit_controller',
'serial-number',
'XXXXXXXXX'
]
]

I'm afraid it can be both a list or a dict...

I'm afraid it can be both a list or a dict...

So isinstance this then and handle it accordingly?

So isinstance this then and handle it accordingly?

yeah, no other option.

yeah, no other option.

It seems like my actual problem (besides this error, which disappeared after commenting out the lines) doesn't actually have to do anything with this, as neither Hue Essentials nor the Ambilight TV accept the Emulated Hue Bridge (again with the error
Unexpected Answer from Bridge: Expected an int but was given 22.804 at path $.lights.3.state.hue
Can you help me with that?

It seems like my actual problem (besides this error, which disappeared after commenting out the lines) doesn't actually have to do anything with this, as neither Hue Essentials nor the Ambilight TV accept the Emulated Hue Bridge (again with the error
Unexpected Answer from Bridge: Expected an int but was given 22.804 at path $.lights.3.state.hue
Can you help me with that?

What version? What's the response of GET /api/username/lights? You can find a username by looking at the logs.

What version? What's the response of GET /api/username/lights? You can find a username by looking at the logs.

I'm using v0.0.11 on HomeAssistant Core 2021.1.0 .   Is it a physical light or a light group?

Do you know what "Dekolampen" is? Is it a physical light or a light group?

Can you also make sure to run that command immediately after seeing that error from Hue Essentials?

Can you also make sure to run that command immediately after seeing that error from Hue Essentials?

Dekolampen is a HA Light Group consisting of all my colored Lights (YeeLight, WLED).
This is the output directly after the error:
{
   "1":{
      "state":{
         "on":true,
         "reachable":true,
         "mode":"homeautomation",
         "bri":255,
         "colormode":"xy",
         "xy":[
            0.323,
            0.329
         ],
         "hue":360,
         "sat":0,
         "effect":"none"
      },
      "name":"Bedroom Ambilight",
      "uniqueid":"00:0f:cc:f0:98:fd:39:e3-fb",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "capabilities":{
         "certified":true,
         "control":{
            "colorgamuttype":"B",
            "colorgamut":[
               [
                  0.675,
                  0.322
               ],
               [
                  0.409,
                  0.518
               ],
               [
                  0.167,
                  0.04
               ]
            ],
            "ct":{

            },
            "maxlumen":800,
            "mindimlevel":1000
         },
         "streaming":{
            "proxy":true,
            "renderer":true
         }
      },
      "type":"Color light",
      "manufacturername":"Signify Netherlands B.V.",
      "productname":"Hue ambiance lamp",
      "modelid":"LTW010",
      "swversion":"<IP_ADDRESS>581"
   },
   "2":{
      "state":{
         "on":false,
         "reachable":true,
         "mode":"homeautomation",
         "bri":0
      },
      "name":"Deckenlampe",
      "uniqueid":"00:8c:60:59:fb:b3:60:83-2b",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "type":"Dimmable light",
      "capabilities":{
         "certified":true,
         "control":{
            "maxlumen":840,
            "mindimlevel":5000
         },
         "streaming":{
            "proxy":false,
            "renderer":false
         }
      },
      "manufacturername":"Signify Netherlands B.V.",
      "productname":"Dimmable light",
      "modelid":"LTW010",
      "swversion":"<IP_ADDRESS>581"
   },
   "3":{
      "state":{
         "on":true,
         "reachable":true,
         "mode":"homeautomation",
         "bri":124,
         "colormode":"xy",
         "xy":[
            0.612,
            0.374
         ],
         "hue":29.971,
         "sat":100.0,
         "ct":0,
         "effect":"Solid",
         "alert":"none"
      },
      "name":"Dekolampen",
      "uniqueid":"00:fd:67:8d:38:ae:ae:d0-9e",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "capabilities":{
         "certified":true,
         "control":{
            "mindimlevel":1000,
            "maxlumen":800,
            "colorgamut":[
               [
                  0.6915,
                  0.3083
               ],
               [
                  0.17,
                  0.7
               ],
               [
                  0.1532,
                  0.0475
               ]
            ],
            "colorgamuttype":"C",
            "ct":{
               "min":153,
               "max":500
            }
         },
         "streaming":{
            "proxy":true,
            "renderer":true
         }
      },
      "type":"Extended color light",
      "manufacturername":"Signify Netherlands B.V.",
      "modelid":"LCT016",
      "productname":"Hue color lamp",
      "swversion":"1.50.2_r30933"
   },
   "4":{
      "state":{
         "on":true,
         "reachable":true,
         "mode":"homeautomation",
         "bri":124,
         "colormode":"xy",
         "xy":[
            0.612,
            0.374
         ],
         "hue":29.971,
         "sat":100.0,
         "ct":0,
         "effect":"Solid",
         "alert":"none"
      },
      "name":"Zimmer",
      "uniqueid":"00:63:f2:55:f9:a4:f2:8b-e2",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "capabilities":{
         "certified":true,
         "control":{
            "mindimlevel":1000,
            "maxlumen":800,
            "colorgamut":[
               [
                  0.6915,
                  0.3083
               ],
               [
                  0.17,
                  0.7
               ],
               [
                  0.1532,
                  0.0475
               ]
            ],
            "colorgamuttype":"C",
            "ct":{
               "min":153,
               "max":500
            }
         },
         "streaming":{
            "proxy":true,
            "renderer":true
         }
      },
      "type":"Extended color light",
      "manufacturername":"Signify Netherlands B.V.",
      "modelid":"LCT016",
      "productname":"Hue color lamp",
      "swversion":"1.50.2_r30933"
   },
   "5":{
      "state":{
         "on":false,
         "reachable":true,
         "mode":"homeautomation",
         "bri":0
      },
      "name":"Deckenlampe 2",
      "uniqueid":"00:4d:61:32:ea:54:48:65-1b",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "type":"Dimmable light",
      "capabilities":{
         "certified":true,
         "control":{
            "maxlumen":840,
            "mindimlevel":5000
         },
         "streaming":{
            "proxy":false,
            "renderer":false
         }
      },
      "manufacturername":"Yeelight Technology",
      "productname":"YLBulb1S(Dimmable)-FEE7",
      "modelid":"YLDP15YL",
      "swversion":"2.0.10"
   },
   "6":{
      "state":{
         "on":false,
         "reachable":true,
         "mode":"homeautomation",
         "bri":0
      },
      "name":"Deckenlampe 1",
      "uniqueid":"00:24:fa:05:14:b8:fe:bd-28",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "type":"Dimmable light",
      "capabilities":{
         "certified":true,
         "control":{
            "maxlumen":840,
            "mindimlevel":5000
         },
         "streaming":{
            "proxy":false,
            "renderer":false
         }
      },
      "manufacturername":"Yeelight Technology",
      "productname":"YLBulb1S(Dimmable)-398A",
      "modelid":"YLDP15YL",
      "swversion":"2.0.10"
   },
   "7":{
      "state":{
         "on":false,
         "reachable":true,
         "mode":"homeautomation",
         "bri":0,
         "colormode":"xy",
         "xy":[
            0,
            0
         ],
         "hue":0,
         "sat":0,
         "effect":"none"
      },
      "name":"Unbenutzt RGB",
      "uniqueid":"00:b5:33:8f:c5:8e:13:7f-f4",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "capabilities":{
         "certified":true,
         "control":{
            "colorgamuttype":"B",
            "colorgamut":[
               [
                  0.675,
                  0.322
               ],
               [
                  0.409,
                  0.518
               ],
               [
                  0.167,
                  0.04
               ]
            ],
            "ct":{

            },
            "maxlumen":800,
            "mindimlevel":1000
         },
         "streaming":{
            "proxy":true,
            "renderer":true
         }
      },
      "type":"Color light",
      "manufacturername":"Yeelight Technology",
      "productname":"YLBulbColor1s-672E",
      "modelid":"YLDP13YL",
      "swversion":"2.0.31"
   },
   "8":{
      "state":{
         "on":true,
         "reachable":true,
         "mode":"homeautomation",
         "bri":102.0,
         "colormode":"xy",
         "xy":[
            0.612,
            0.374
         ],
         "hue":30.0,
         "sat":100.0,
         "effect":"none"
      },
      "name":"Sofalampe",
      "uniqueid":"00:61:00:85:ee:05:45:f2-82",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "capabilities":{
         "certified":true,
         "control":{
            "colorgamuttype":"B",
            "colorgamut":[
               [
                  0.675,
                  0.322
               ],
               [
                  0.409,
                  0.518
               ],
               [
                  0.167,
                  0.04
               ]
            ],
            "ct":{

            },
            "maxlumen":800,
            "mindimlevel":1000
         },
         "streaming":{
            "proxy":true,
            "renderer":true
         }
      },
      "type":"Color light",
      "manufacturername":"Yeelight Technology",
      "productname":"YLBulbColor1s-DD83",
      "modelid":"YLDP13YL",
      "swversion":"2.0.30"
   },
   "9":{
      "state":{
         "on":true,
         "reachable":true,
         "mode":"homeautomation",
         "bri":255.0,
         "colormode":"xy",
         "xy":[
            0.612,
            0.374
         ],
         "hue":30.0,
         "sat":100.0,
         "effect":"none"
      },
      "name":"Stehlampe",
      "uniqueid":"00:66:08:0f:91:68:62:03-c8",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "capabilities":{
         "certified":true,
         "control":{
            "colorgamuttype":"B",
            "colorgamut":[
               [
                  0.675,
                  0.322
               ],
               [
                  0.409,
                  0.518
               ],
               [
                  0.167,
                  0.04
               ]
            ],
            "ct":{

            },
            "maxlumen":800,
            "mindimlevel":1000
         },
         "streaming":{
            "proxy":true,
            "renderer":true
         }
      },
      "type":"Color light",
      "manufacturername":"Yeelight Technology",
      "productname":"YLBulbColor1s-49D7",
      "modelid":"YLDP13YL",
      "swversion":"2.0.31"
   },
   "10":{
      "state":{
         "on":true,
         "reachable":true,
         "mode":"homeautomation",
         "bri":71.4,
         "colormode":"xy",
         "xy":[
            0.612,
            0.374
         ],
         "hue":30.0,
         "sat":100.0,
         "effect":"none"
      },
      "name":"Bettlampe",
      "uniqueid":"00:aa:53:2d:d9:3d:8c:5f-88",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "capabilities":{
         "certified":true,
         "control":{
            "colorgamuttype":"B",
            "colorgamut":[
               [
                  0.675,
                  0.322
               ],
               [
                  0.409,
                  0.518
               ],
               [
                  0.167,
                  0.04
               ]
            ],
            "ct":{

            },
            "maxlumen":800,
            "mindimlevel":1000
         },
         "streaming":{
            "proxy":true,
            "renderer":true
         }
      },
      "type":"Color light",
      "manufacturername":"Yeelight Technology",
      "productname":"YLBulbColor1s-4768",
      "modelid":"YLDP13YL",
      "swversion":"2.0.31"
   },
   "11":{
      "state":{
         "on":false,
         "reachable":true,
         "mode":"homeautomation",
         "bri":0
      },
      "name":"Deckenlampe 3",
      "uniqueid":"00:3c:de:fe:55:8f:f0:5b-78",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "type":"Dimmable light",
      "capabilities":{
         "certified":true,
         "control":{
            "maxlumen":840,
            "mindimlevel":5000
         },
         "streaming":{
            "proxy":false,
            "renderer":false
         }
      },
      "manufacturername":"Yeelight Technology",
      "productname":"YLBulbWhite1S-FC33",
      "modelid":"YLDP15YL",
      "swversion":"1.3.7"
   },
   "12":{
      "state":{
         "on":true,
         "reachable":true,
         "mode":"homeautomation",
         "bri":69,
         "colormode":"xy",
         "xy":[
            0.614,
            0.373
         ],
         "hue":29.882,
         "sat":100.0,
         "ct":0,
         "effect":"Solid",
         "alert":"none"
      },
      "name":"Schreibtischlampe",
      "uniqueid":"00:25:05:cf:fa:2d:90:8b-ad",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "capabilities":{
         "certified":true,
         "control":{
            "mindimlevel":1000,
            "maxlumen":800,
            "colorgamut":[
               [
                  0.6915,
                  0.3083
               ],
               [
                  0.17,
                  0.7
               ],
               [
                  0.1532,
                  0.0475
               ]
            ],
            "colorgamuttype":"C",
            "ct":{
               "min":153,
               "max":500
            }
         },
         "streaming":{
            "proxy":true,
            "renderer":true
         }
      },
      "type":"Extended color light",
      "manufacturername":"WLED",
      "modelid":"FOSS",
      "productname":"WLED",
      "swversion":"0.11.1"
   }
}

Dekolampen is a HA Light Group consisting of all my colored Lights (YeeLight, WLED).
This is the output directly after the error:
{
   "1":{
      "state":{
         "on":true,
         "reachable":true,
         "mode":"homeautomation",
         "bri":255,
         "colormode":"xy",
         "xy":[
            0.323,
            0.329
         ],
         "hue":360,
         "sat":0,
         "effect":"none"
      },
      "name":"Bedroom Ambilight",
      "uniqueid":"00:0f:cc:f0:98:fd:39:e3-fb",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "capabilities":{
         "certified":true,
         "control":{
            "colorgamuttype":"B",
            "colorgamut":[
               [
                  0.675,
                  0.322
               ],
               [
                  0.409,
                  0.518
               ],
               [
                  0.167,
                  0.04
               ]
            ],
            "ct":{

            },
            "maxlumen":800,
            "mindimlevel":1000
         },
         "streaming":{
            "proxy":true,
            "renderer":true
         }
      },
      "type":"Color light",
      "manufacturername":"Signify Netherlands B.V.",
      "productname":"Hue ambiance lamp",
      "modelid":"LTW010",
      "swversion":"<IP_ADDRESS>581"
   },
   "2":{
      "state":{
         "on":false,
         "reachable":true,
         "mode":"homeautomation",
         "bri":0
      },
      "name":"Deckenlampe",
      "uniqueid":"00:8c:60:59:fb:b3:60:83-2b",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "type":"Dimmable light",
      "capabilities":{
         "certified":true,
         "control":{
            "maxlumen":840,
            "mindimlevel":5000
         },
         "streaming":{
            "proxy":false,
            "renderer":false
         }
      },
      "manufacturername":"Signify Netherlands B.V.",
      "productname":"Dimmable light",
      "modelid":"LTW010",
      "swversion":"<IP_ADDRESS>581"
   },
   "3":{
      "state":{
         "on":true,
         "reachable":true,
         "mode":"homeautomation",
         "bri":124,
         "colormode":"xy",
         "xy":[
            0.612,
            0.374
         ],
         "hue":29.971,
         "sat":100.0,
         "ct":0,
         "effect":"Solid",
         "alert":"none"
      },
      "name":"Dekolampen",
      "uniqueid":"00:fd:67:8d:38:ae:ae:d0-9e",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "capabilities":{
         "certified":true,
         "control":{
            "mindimlevel":1000,
            "maxlumen":800,
            "colorgamut":[
               [
                  0.6915,
                  0.3083
               ],
               [
                  0.17,
                  0.7
               ],
               [
                  0.1532,
                  0.0475
               ]
            ],
            "colorgamuttype":"C",
            "ct":{
               "min":153,
               "max":500
            }
         },
         "streaming":{
            "proxy":true,
            "renderer":true
         }
      },
      "type":"Extended color light",
      "manufacturername":"Signify Netherlands B.V.",
      "modelid":"LCT016",
      "productname":"Hue color lamp",
      "swversion":"1.50.2_r30933"
   },
   "4":{
      "state":{
         "on":true,
         "reachable":true,
         "mode":"homeautomation",
         "bri":124,
         "colormode":"xy",
         "xy":[
            0.612,
            0.374
         ],
         "hue":29.971,
         "sat":100.0,
         "ct":0,
         "effect":"Solid",
         "alert":"none"
      },
      "name":"Zimmer",
      "uniqueid":"00:63:f2:55:f9:a4:f2:8b-e2",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "capabilities":{
         "certified":true,
         "control":{
            "mindimlevel":1000,
            "maxlumen":800,
            "colorgamut":[
               [
                  0.6915,
                  0.3083
               ],
               [
                  0.17,
                  0.7
               ],
               [
                  0.1532,
                  0.0475
               ]
            ],
            "colorgamuttype":"C",
            "ct":{
               "min":153,
               "max":500
            }
         },
         "streaming":{
            "proxy":true,
            "renderer":true
         }
      },
      "type":"Extended color light",
      "manufacturername":"Signify Netherlands B.V.",
      "modelid":"LCT016",
      "productname":"Hue color lamp",
      "swversion":"1.50.2_r30933"
   },
   "5":{
      "state":{
         "on":false,
         "reachable":true,
         "mode":"homeautomation",
         "bri":0
      },
      "name":"Deckenlampe 2",
      "uniqueid":"00:4d:61:32:ea:54:48:65-1b",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "type":"Dimmable light",
      "capabilities":{
         "certified":true,
         "control":{
            "maxlumen":840,
            "mindimlevel":5000
         },
         "streaming":{
            "proxy":false,
            "renderer":false
         }
      },
      "manufacturername":"Yeelight Technology",
      "productname":"YLBulb1S(Dimmable)-FEE7",
      "modelid":"YLDP15YL",
      "swversion":"2.0.10"
   },
   "6":{
      "state":{
         "on":false,
         "reachable":true,
         "mode":"homeautomation",
         "bri":0
      },
      "name":"Deckenlampe 1",
      "uniqueid":"00:24:fa:05:14:b8:fe:bd-28",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "type":"Dimmable light",
      "capabilities":{
         "certified":true,
         "control":{
            "maxlumen":840,
            "mindimlevel":5000
         },
         "streaming":{
            "proxy":false,
            "renderer":false
         }
      },
      "manufacturername":"Yeelight Technology",
      "productname":"YLBulb1S(Dimmable)-398A",
      "modelid":"YLDP15YL",
      "swversion":"2.0.10"
   },
   "7":{
      "state":{
         "on":false,
         "reachable":true,
         "mode":"homeautomation",
         "bri":0,
         "colormode":"xy",
         "xy":[
            0,
            0
         ],
         "hue":0,
         "sat":0,
         "effect":"none"
      },
      "name":"Unbenutzt RGB",
      "uniqueid":"00:b5:33:8f:c5:8e:13:7f-f4",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "capabilities":{
         "certified":true,
         "control":{
            "colorgamuttype":"B",
            "colorgamut":[
               [
                  0.675,
                  0.322
               ],
               [
                  0.409,
                  0.518
               ],
               [
                  0.167,
                  0.04
               ]
            ],
            "ct":{

            },
            "maxlumen":800,
            "mindimlevel":1000
         },
         "streaming":{
            "proxy":true,
            "renderer":true
         }
      },
      "type":"Color light",
      "manufacturername":"Yeelight Technology",
      "productname":"YLBulbColor1s-672E",
      "modelid":"YLDP13YL",
      "swversion":"2.0.31"
   },
   "8":{
      "state":{
         "on":true,
         "reachable":true,
         "mode":"homeautomation",
         "bri":102.0,
         "colormode":"xy",
         "xy":[
            0.612,
            0.374
         ],
         "hue":30.0,
         "sat":100.0,
         "effect":"none"
      },
      "name":"Sofalampe",
      "uniqueid":"00:61:00:85:ee:05:45:f2-82",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "capabilities":{
         "certified":true,
         "control":{
            "colorgamuttype":"B",
            "colorgamut":[
               [
                  0.675,
                  0.322
               ],
               [
                  0.409,
                  0.518
               ],
               [
                  0.167,
                  0.04
               ]
            ],
            "ct":{

            },
            "maxlumen":800,
            "mindimlevel":1000
         },
         "streaming":{
            "proxy":true,
            "renderer":true
         }
      },
      "type":"Color light",
      "manufacturername":"Yeelight Technology",
      "productname":"YLBulbColor1s-DD83",
      "modelid":"YLDP13YL",
      "swversion":"2.0.30"
   },
   "9":{
      "state":{
         "on":true,
         "reachable":true,
         "mode":"homeautomation",
         "bri":255.0,
         "colormode":"xy",
         "xy":[
            0.612,
            0.374
         ],
         "hue":30.0,
         "sat":100.0,
         "effect":"none"
      },
      "name":"Stehlampe",
      "uniqueid":"00:66:08:0f:91:68:62:03-c8",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "capabilities":{
         "certified":true,
         "control":{
            "colorgamuttype":"B",
            "colorgamut":[
               [
                  0.675,
                  0.322
               ],
               [
                  0.409,
                  0.518
               ],
               [
                  0.167,
                  0.04
               ]
            ],
            "ct":{

            },
            "maxlumen":800,
            "mindimlevel":1000
         },
         "streaming":{
            "proxy":true,
            "renderer":true
         }
      },
      "type":"Color light",
      "manufacturername":"Yeelight Technology",
      "productname":"YLBulbColor1s-49D7",
      "modelid":"YLDP13YL",
      "swversion":"2.0.31"
   },
   "10":{
      "state":{
         "on":true,
         "reachable":true,
         "mode":"homeautomation",
         "bri":71.4,
         "colormode":"xy",
         "xy":[
            0.612,
            0.374
         ],
         "hue":30.0,
         "sat":100.0,
         "effect":"none"
      },
      "name":"Bettlampe",
      "uniqueid":"00:aa:53:2d:d9:3d:8c:5f-88",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "capabilities":{
         "certified":true,
         "control":{
            "colorgamuttype":"B",
            "colorgamut":[
               [
                  0.675,
                  0.322
               ],
               [
                  0.409,
                  0.518
               ],
               [
                  0.167,
                  0.04
               ]
            ],
            "ct":{

            },
            "maxlumen":800,
            "mindimlevel":1000
         },
         "streaming":{
            "proxy":true,
            "renderer":true
         }
      },
      "type":"Color light",
      "manufacturername":"Yeelight Technology",
      "productname":"YLBulbColor1s-4768",
      "modelid":"YLDP13YL",
      "swversion":"2.0.31"
   },
   "11":{
      "state":{
         "on":false,
         "reachable":true,
         "mode":"homeautomation",
         "bri":0
      },
      "name":"Deckenlampe 3",
      "uniqueid":"00:3c:de:fe:55:8f:f0:5b-78",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "type":"Dimmable light",
      "capabilities":{
         "certified":true,
         "control":{
            "maxlumen":840,
            "mindimlevel":5000
         },
         "streaming":{
            "proxy":false,
            "renderer":false
         }
      },
      "manufacturername":"Yeelight Technology",
      "productname":"YLBulbWhite1S-FC33",
      "modelid":"YLDP15YL",
      "swversion":"1.3.7"
   },
   "12":{
      "state":{
         "on":true,
         "reachable":true,
         "mode":"homeautomation",
         "bri":69,
         "colormode":"xy",
         "xy":[
            0.614,
            0.373
         ],
         "hue":29.882,
         "sat":100.0,
         "ct":0,
         "effect":"Solid",
         "alert":"none"
      },
      "name":"Schreibtischlampe",
      "uniqueid":"00:25:05:cf:fa:2d:90:8b-ad",
      "swupdate":{
         "state":"noupdates",
         "lastinstall":"2021-01-09T21:31:43"
      },
      "capabilities":{
         "certified":true,
         "control":{
            "mindimlevel":1000,
            "maxlumen":800,
            "colorgamut":[
               [
                  0.6915,
                  0.3083
               ],
               [
                  0.17,
                  0.7
               ],
               [
                  0.1532,
                  0.0475
               ]
            ],
            "colorgamuttype":"C",
            "ct":{
               "min":153,
               "max":500
            }
         },
         "streaming":{
            "proxy":true,
            "renderer":true
         }
      },
      "type":"Extended color light",
      "manufacturername":"WLED",
      "modelid":"FOSS",
      "productname":"WLED",
      "swversion":"0.11.1"
   }
}

Well this is perplexing considering that you are running 0.0.11... Hue and Sat shouldn't even be part of the config for that version as that was a recently implemented feature. Those values should also be an integer from HA...
Would you be able to try the dev version to see if you still experience these issues? We may release a new version soon since it seems that it is relatively stable atm.

Well this is perplexing considering that you are running 0.0.11... Hue and Sat shouldn't even be part of the config for that version as that was a recently implemented feature. Those values should also be an integer from HA...
Would you be able to try the dev version to see if you still experience these issues? We may release a new version soon since it seems that it is relatively stable atm.

Which branch do you mean so that I can try dev? I can't use the dev from your repo since I need to change to code because of my yeelights

Which branch do you mean so that I can try dev? I can't use the dev from your repo since I need to change to code because of my yeelights

What's wrong with the code that's causing you to have to change it due to yeelights?

What's wrong with the code that's causing you to have to change it due to yeelights?

This error is still there in the dev version, so I think I need to patch that out right?
File "/app/emulated_hue/api.py", line 772, in __async_entity_to_hue
    for key, value in device["identifiers"]:
ValueError: too many values to unpack (expected 2)

This error is still there in the dev version, so I think I need to patch that out right?
File "/app/emulated_hue/api.py", line 772, in __async_entity_to_hue
    for key, value in device["identifiers"]:
ValueError: too many values to unpack (expected 2)

Oh right. Forgot about that issue. Just pushed a fix to fix/api-inconsistencies so try that branch.

Oh right. Forgot about that issue. Just pushed a fix to fix/api-inconsistencies so try that branch.

Tried it with that branch, the issue with the ValueError is fixed, but the other issue with Unexpected Answer from Bridge: Expected an int but was given 22.804 at path $.lights.3.state.hue sadly still persists

Tried it with that branch, the issue with the ValueError is fixed, but the other issue with Unexpected Answer from Bridge: Expected an int but was given 22.804 at path $.lights.3.state.hue sadly still persists

Interesting... Thats an easy fix, but I'm trying to determine why thats happening in the first place.

Interesting... Thats an easy fix, but I'm trying to determine why thats happening in the first place.

I looked a bit into the code, when I wrap everything into an int that goes out to the hue json api, it works. But this does not seem to be the best solution

I looked a bit into the code, when I wrap everything into an int that goes out to the hue json api, it works. But this does not seem to be the best solution

Yeah ideally, I would like to avoid that. That certainly would work though...

Yeah ideally, I would like to avoid that. That certainly would work though...

Can you post the attributes shown in HASS from developer tools for "Dekolampen "?

Can you post the attributes shown in HASS from developer tools for "Dekolampen "?

Sure, that's
min_mireds: 153
max_mireds: 500
effect_list: Random Colors, Solid, Chase Rainbow, Scanner Dual, Fire Flicker, ICU, Chase, Candle Multi, Chunchun, Fill Noise, Rainbow, Flow, Meteor Smooth, Bpm, Breathe, Spots, Railway, Sinelon Rainbow, Colorful, Sparkle Dark, Twinkle, Blink Rainbow, Merry Christmas, Blends, Lightning, Running, Dynamic, Candle, Pride 2015, Sinelon Dual, Percent, Two Dots, Washing Machine, Scan, Solid Glitter, Sweep, Noise 4, Noise 2, Scan Dual, Popcorn, Police, Halloween, Colortwinkles, Scanner, Theater Rainbow, Twinkleup, Heartbeat, Fire 2012, Stream, Colorwaves, Bouncing Balls, Phased Noise, Dissolve, Rain, Colorloop, Traffic Light, Noise 1, Circus, Pacifica, Wipe Random, Dancing Shadows, Tri Chase, Tri Wipe, Theater, Phased, Sinelon, Noise 3, Police All, Sunrise, Android, Sparkle+, Blink, Ripple, Ripple Rainbow, Dissolve Rnd, Glitter, Strobe, Lake, Red & Blue, Strobe Rainbow, Two Areas, Meteor, Chase Flash Rnd, Twinklecat, Juggle, Strobe Mega, Sparkle, Multi Comet, Saw, Sine, Solid Pattern Tri, Wipe, Solid Pattern, Halloween Eyes, Candy Cane, Oscillate, Twinklefox, Fireworks Starburst, Running 2, Fireworks 1D, Gradient, Stream 2, Spots Fade, Plasma, Chase Flash, Fireworks, Drip, Rainbow Runner, Lighthouse, Fade, Loading, Noise Pal, Palette, Tri Fade, Chase Random, Sweep Random
brightness: 120
hs_color: 23.861, 93.083
rgb_color: 255, 112, 17
xy_color: 0.628, 0.357
white_value: 93
effect: Solid
entity_id: light.sofalampe, light.bettlampe, light.schreibtischlampe, light.stehlampe
friendly_name: Dekolampen
icon: mdi:lightbulb-group
supported_features: 183

By the way, with the modifications I mentioned before, connection now works without problems and the bridge gets recognized by Hue Essentials and I can control the lights in normal mode without problems. However when changing to entertainment mode, the lights don't react at all (the light color, brightness, ...) stays the same. No errors in the log, this is the only output:
2021-01-10 04:47:32,209 INFO  emulated_hue.entertainment -- Start HUE Entertainment Service on UDP port 2100.
2021-01-10 04:47:56,405 INFO  emulated_hue.api -- Stop Entertainment mode for group 8 - params: {'stream': {'active': False}}
2021-01-10 04:47:56,408 INFO  emulated_hue.entertainment -- HUE Entertainment Service stopped.

Sure, that's
min_mireds: 153
max_mireds: 500
effect_list: Random Colors, Solid, Chase Rainbow, Scanner Dual, Fire Flicker, ICU, Chase, Candle Multi, Chunchun, Fill Noise, Rainbow, Flow, Meteor Smooth, Bpm, Breathe, Spots, Railway, Sinelon Rainbow, Colorful, Sparkle Dark, Twinkle, Blink Rainbow, Merry Christmas, Blends, Lightning, Running, Dynamic, Candle, Pride 2015, Sinelon Dual, Percent, Two Dots, Washing Machine, Scan, Solid Glitter, Sweep, Noise 4, Noise 2, Scan Dual, Popcorn, Police, Halloween, Colortwinkles, Scanner, Theater Rainbow, Twinkleup, Heartbeat, Fire 2012, Stream, Colorwaves, Bouncing Balls, Phased Noise, Dissolve, Rain, Colorloop, Traffic Light, Noise 1, Circus, Pacifica, Wipe Random, Dancing Shadows, Tri Chase, Tri Wipe, Theater, Phased, Sinelon, Noise 3, Police All, Sunrise, Android, Sparkle+, Blink, Ripple, Ripple Rainbow, Dissolve Rnd, Glitter, Strobe, Lake, Red & Blue, Strobe Rainbow, Two Areas, Meteor, Chase Flash Rnd, Twinklecat, Juggle, Strobe Mega, Sparkle, Multi Comet, Saw, Sine, Solid Pattern Tri, Wipe, Solid Pattern, Halloween Eyes, Candy Cane, Oscillate, Twinklefox, Fireworks Starburst, Running 2, Fireworks 1D, Gradient, Stream 2, Spots Fade, Plasma, Chase Flash, Fireworks, Drip, Rainbow Runner, Lighthouse, Fade, Loading, Noise Pal, Palette, Tri Fade, Chase Random, Sweep Random
brightness: 120
hs_color: 23.861, 93.083
rgb_color: 255, 112, 17
xy_color: 0.628, 0.357
white_value: 93
effect: Solid
entity_id: light.sofalampe, light.bettlampe, light.schreibtischlampe, light.stehlampe
friendly_name: Dekolampen
icon: mdi:lightbulb-group
supported_features: 183

By the way, with the modifications I mentioned before, connection now works without problems and the bridge gets recognized by Hue Essentials and I can control the lights in normal mode without problems. However when changing to entertainment mode, the lights don't react at all (the light color, brightness, ...) stays the same. No errors in the log, this is the only output:
2021-01-10 04:47:32,209 INFO  emulated_hue.entertainment -- Start HUE Entertainment Service on UDP port 2100.
2021-01-10 04:47:56,405 INFO  emulated_hue.api -- Stop Entertainment mode for group 8 - params: {'stream': {'active': False}}
2021-01-10 04:47:56,408 INFO  emulated_hue.entertainment -- HUE Entertainment Service stopped.

I'm inclined to believe that this is a bug with Home Assistant since I believe that hs_color should always be reported as an int. Although given that it seems like the only way to deal with this bug would be to wrap everything with int...
Try entertainment mode with the official hue app?

I'm inclined to believe that this is a bug with Home Assistant since I believe that hs_color should always be reported as an int. Although given that it seems like the only way to deal with this bug would be to wrap everything with int...
Try entertainment mode with the official hue app?

Same result, nothing changes. Tested with official hue app as well as with the Ambilight TV Hue Connect Feature

Same result, nothing changes. Tested with official hue app as well as with the Ambilight TV Hue Connect Feature

Pushed out another fix for the float issue.

Pushed out another fix for the float issue.

Just released a new version that should have patched all the issues mentioned here. Please open a new issue if there are more problems.

Just released a new version that should have patched all the issues mentioned here. Please open a new issue if there are more problems.


Clean up unused CI tool codes

Don't need these in GitHub Actions, clean them up now

@wu-sheng did the Jenkins check statuses removed now? some of the PRs show the failure but others not? Is there a ticket to track it?

Yes, the remove is still on going. I and INFRA are not sure why they keep showing up if the PR submitted by committer. https://issues.apache.org/jira/browse/INFRA-19502

Codecov Report

Merging #4025 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #4025   +/-   ##
=======================================
  Coverage   27.55%   27.55%
=======================================
  Files        1122     1122
  Lines       24337    24337
  Branches     3527     3527
=======================================
  Hits         6707     6707
  Misses      17033    17033
  Partials      597      597

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34fd863...01167b2. Read the comment docs.


Infinite loop while querying BIDS directory

Happening in MRIQC, probably I'm making some kind of wrong configuration.
When interrupted, the traceback shows:
  File "/home/oesteban/workspace/mriqc/mriqc/utils/bids.py", line 24, in collect_bids_data
    layout = BIDSLayout(dataset)
  File "/home/oesteban/.anaconda3/lib/python3.6/site-packages/grabbit/core.py", line 315, in __call__
    **kwargs)
  File "/home/oesteban/.anaconda3/lib/python3.6/site-packages/bids/grabbids/bids_layout.py", line 103, in __init__
    exclude=exclude, **kwargs)
  File "/home/oesteban/.anaconda3/lib/python3.6/site-packages/grabbit/core.py", line 421, in __init__
    self.index()
  File "/home/oesteban/.anaconda3/lib/python3.6/site-packages/grabbit/core.py", line 635, in index
    _index_domain_files(dom)
  File "/home/oesteban/.anaconda3/lib/python3.6/site-packages/grabbit/core.py", line 604, in _index_domain_files
    dataset = self._get_files(dom.config['root'])
  File "/home/oesteban/.anaconda3/lib/python3.6/site-packages/grabbit/core.py", line 530, in _get_files
    return list(chain(*results))
  File "/home/oesteban/.anaconda3/lib/python3.6/os.py", line 409, in walk
    yield from walk(new_path, topdown, onerror, followlinks)
  File "/home/oesteban/.anaconda3/lib/python3.6/os.py", line 409, in walk
    yield from walk(new_path, topdown, onerror, followlinks)
  File "/home/oesteban/.anaconda3/lib/python3.6/os.py", line 409, in walk
    yield from walk(new_path, topdown, onerror, followlinks)
  [Previous line repeated 2 more times]
  File "/home/oesteban/.anaconda3/lib/python3.6/os.py", line 358, in walk
    entry = next(scandir_it)

Sorry about the delay; I'll try to look at this at the OHBM hackathon in the next couple of days!

Is this still causing problems?

I did a workaround to this problem, let's close it and I'll reopen if I see
any regression.
On Wed, Jun 20, 2018 at 9:40 AM, Tal Yarkoni<EMAIL_ADDRESS>wrote:

Is this still causing problems?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/INCF/pybids/issues/193#issuecomment-398655023, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAkhxmOTXXUCvH7iY67Jnf8tgBUt68noks5t-fyEgaJpZM4UlEz2
.

Any updates to this? Can we close it, or do you think there's still a problem with pybids?

I'll close it, I haven't experienced it again.


fix(schematics): use ngAfterViewInit instead of ngOnInit in table

According to the offical doc of Angular, view queries are set before the ngAfterViewInit callback is called.
https://angular.io/api/core/ViewChild
ngOnInit works with the current version of Angular, but it can change in the future.

This looks fine since data is not set before view initialization. If it was, the table would render all the rows before view initialization is complete, and then correct itself after the sort/paginator is set.

@andrewseguin is that a formal approval?

Yes it is - added the labels


Fix typo

This will need an admin-merge, any admin can do that.
Here is the long-term fix:

#4529

I admin-merged this PR, due to bug #4529


Use an ID Attribute to Style an Element

Challenge Use an ID Attribute to Style an Element has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

CatPhotoApp

Click here for cat photos.

Things cats love:

cat nip

laser pointers

lasagna

Top 3 things cats hate:

flea treatment

thunder

other cats

<form action="/submit-cat-photo" id="cat-photo-form">
  <input type="radio" name="indoor-outdoor" checked> Indoor
  <input type="radio" name="indoor-outdoor"> Outdoor
  <input type="checkbox" name="personality" checked> Loving
  <input type="checkbox" name="personality"> Lazy
  <input type="checkbox" name="personality"> Energetic
  <input type="text" placeholder="cat photo URL" required>
  <button type="submit">Submit</button>
</form>

Please provide details of the issue that you are facing.
The issue tracker is for reporting bugs only. Please use the help chat room or try looking through the forum for help with a specific challenge.
Happy Coding.

Your form element has id cat-photo form.
In your style tag, you have written:
 #cat-photo-element {     background-color: green;

No closing }.
You're using cat-photo-element. It should be cat-photo-form since that's the value of id attribute on your form.

@raisedadead Please close this issue. Thanks.

@ajain17 please point campers toward the chat room as @raisedadead has done so they can get code help there instead of on the issue threads. Thanks for continued help!

@dhcodes  If I can see what the issue is, should I still redirect them to the help chat room or try to resolve their issues in here only?

You should redirect them there.

@ajain17 I left you a message on Gitter.


Jacobovazquez microsoft/dev

@jacobovazquez I have made changes to the jar version number. I don't have access to commit the changes to your branch, if you can accept and merge these changes, I can merge your sample.
Thanks!


Re-add documentation for consul_install_dependencies

Re-adds documentation for the consul_install_dependencies variable.
I suppose this was removed by accident in  in https://github.com/ansible-community/ansible-consul/commit/ad475185c4b6269a69f20153bd2438e3f8b70bbe when @brianshumate removed local unzip installation, however the key is also used for installing pip dependencies locally which should be a optional step and should thus be documented.
That being said, I'm not really fond of having this value set to true by default, the python dependencies should be detected and the install should only run when needed or this local pip task could even be dropped.

thanks for all the PR's @gardar


herbs new fails when git is not installed

Describe the bug
While starting a new project with herbs new command, the process fails when trying to git init a repository, rather than informing the user that git isn't installed
To Reproduce

Have a machine without git installed
Run herbs new
Select 'Do you want to initialize a Git repository? Yes'

I'm sure it's a bug because you really don't have the git installed into your machine, but I agree it's not a great development experience.
What do you think about checking if the git exists before we try to run the git? so, if the git isn't we could just show a message instead an error

if I help you, could you fix it for us, please?

I will take a look on that problem


Add proper debug messages

Use _doing_it_wrong where appropriate to notify developers of things that should be done differently.

Added quite a few in this version, I'll continue adding them as we go.
No need to keep this one open


Create version end point

Is your feature request related to a problem? Please describe.
When consuming the API there is no easy way to know what version of the client is being run.
Describe the solution you'd like
/api/version end point with the version of the client.
Describe alternatives you've considered
None
Additional context
This will allow dealing gracefully with older or non supported clients being run against new front ends.

sample response
{
  "version": "vxx.xx.xx",
  "commit": "xxxx",
  "time": "xxx":
}

Checking this out.

Big thanks @nikosk686 for your help for this :boom: it makes #110 possible and importantly allows the front end to tell the user that their client needs upgrading. This will be essential when we work on #244 and other breaking changes.