mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-22 16:56:29 +00:00
Add method to return 'hass' object from browser console to docs (#368)
* Add method to return 'hass' object from browser console * better grammar * add warning about accessing hass property and update call per bram's suggestion * Update frontend_data.md
This commit is contained in:
parent
38bc857dd4
commit
35224e33f7
@ -11,6 +11,14 @@ Whenever a state changes, a new version of the objects that changed are created.
|
||||
const changed = newVal !== oldVal;
|
||||
```
|
||||
|
||||
In order to see the data available in the `hass` object, visit your HomeAssistant frontend in your favorite browser and open the browser's developer tools. On the elements panel, select the `<home-assistant>` element, or any other element that has the `hass` property, and then run the following command in the console panel:
|
||||
|
||||
```js
|
||||
$0.hass
|
||||
```
|
||||
|
||||
This method of reading the `hass` object should only be used as a reference. In order to interact with `hass` in your code, make sure it is passed to your code correctly.
|
||||
|
||||
## Data
|
||||
|
||||
### `hass.states`
|
||||
|
Loading…
x
Reference in New Issue
Block a user