Skip to content

Fix display of arrays/objects in attributes#4836

Merged
balloob merged 2 commits into
devfrom
attibutes-objects
Feb 13, 2020
Merged

Fix display of arrays/objects in attributes#4836
balloob merged 2 commits into
devfrom
attibutes-objects

Conversation

@bramkragten
Copy link
Copy Markdown
Member

@bramkragten bramkragten commented Feb 11, 2020

Proposed change

An array with an array of object and objects are now parsed as yaml.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

Comment thread src/components/ha-attributes.ts Outdated
import { HassEntity } from "home-assistant-js-websocket";

import hassAttributeUtil from "../util/hass-attributes-util";
import { safeDump } from "js-yaml";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we import this async? We won't need it most of the time and we import the more info dialogs pretty early on.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use memoizeOne and a promise to import + render combined with lit rendering output of promise.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only care about this component because it's used in more info. For dev tool I don't care

@balloob balloob merged commit 6feaf64 into dev Feb 13, 2020
@delete-merged-branch delete-merged-branch Bot deleted the attibutes-objects branch February 13, 2020 16:22
@lock lock Bot locked and limited conversation to collaborators Feb 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bayesian binary sensor details - strange details view.

3 participants