forked from blakadder/zigbee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
devices.json
23 lines (22 loc) · 1.03 KB
/
devices.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
title: JSON
layout: null
---
{
"created": "{{ site.time }}",
"devices":
[
{% for device in site.zigbee %}
{
{% if device.model != nil %}"model": {{ device.model | jsonify }},{% endif %}
{% if device.title != nil %}"name": {{ device.title | jsonify }},{% endif %}
{% if device.vendor != nil %}"vendor": {{ device.vendor | jsonify }},{% endif %}
{% if device.category != nil %}"category": "{{ device.category }}",{% endif %}
{% if device.zigbeemodel != nil %}"zigbeemodel": [{% assign zbmodel = device.zigbeemodel %}{% for item in zbmodel %}"{{ item }}"{% unless forloop.last %},{% endunless %}{% endfor %}],{% endif %}
{% if device.compatible != nil %}"compatible": {{ device.compatible | jsonify }},{% endif %}
"image": "{{ device.url | remove: ".html" | prepend: 'https://zigbee/blakadder.com/assets/images/devices' | append: '.jpg' }}",
"link": "{{ device.url }}"
}{% unless forloop.last %},{% endunless %}
{% endfor %}
]
}