Clean up outdated/old school examples (#33284)

This commit is contained in:
Franck Nijhof 2024-06-15 18:32:39 +02:00 committed by GitHub
parent 51bb07895b
commit bd41f2a992
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
29 changed files with 5 additions and 220 deletions

View File

@ -30,8 +30,6 @@ task :generate do
abort("Generating alerts data failed") unless success
success = system "rake version_data"
abort("Generating version data failed") unless success
success = system "rake blueprint_exchange_data"
abort("Generating blueprint exchange data failed") unless success
success = system "jekyll build"
abort("Generating site failed") unless success
if ENV["CONTEXT"] != 'production'
@ -70,7 +68,6 @@ task :preview, :listen do |t, args|
system "rake analytics_data"
system "rake version_data"
system "rake alerts_data"
system "rake blueprint_exchange_data"
jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll build -t --watch --incremental")
compassPid = Process.spawn("compass watch")
rackupPid = Process.spawn("rackup --port #{server_port} --host #{listen_addr}")
@ -116,14 +113,3 @@ task :version_data do
file.write(JSON.generate(remote_data))
end
end
desc "Download data from the blueprint exchange @ community.home-assistant.io"
task :blueprint_exchange_data do
uri = URI('https://community.home-assistant.io/c/blueprints-exchange/53/l/top.json?period=all')
remote_data = JSON.parse(Net::HTTP.get(uri))
File.open("#{source_dir}/_data/blueprint_exchange_data.json", "w") do |file|
file.write(JSON.generate(remote_data['topic_list']['topics']))
end
end

View File

@ -67,8 +67,6 @@ titlecase: true # Converts page and post titles to titlecase
collections:
integrations:
output: true
examples:
output: true
docs:
output: true
addons:

View File

@ -26,6 +26,6 @@
"scripts": {
"markdown:lint": "remark --quiet --frail .",
"textlint:all": "textlint source",
"textlint": "textlint source/_examples source/_docs source/_faq source/_integrations source/_dashboards source/cloud source/getting-started source/hassio source/dashboards"
"textlint": "textlint source/_docs source/_faq source/_integrations source/_dashboards source/cloud source/getting-started source/hassio source/dashboards"
}
}

View File

@ -87,4 +87,4 @@ For configuration changes to become effective, the configuration must be reloade
## Troubleshooting the configuration
If you run into trouble while configuring Home Assistant, refer to the [configuration troubleshooting page](/docs/configuration/troubleshooting/) and the [`configuration.yaml` examples](/examples/#example-configurationyaml).
If you run into trouble while configuring Home Assistant, refer to the [configuration troubleshooting page](/docs/configuration/troubleshooting/).

View File

@ -4,8 +4,6 @@ description: "Splitting the configuration.yaml into several files."
related:
- docs: /docs/configuration/
title: configuration.yaml file
- docs: /examples/#example-configurationyaml
title: Example configuration files by the community
- docs: /docs/configuration/packages
title: Using packages to organize configuration files
---
@ -14,7 +12,7 @@ So you've been using Home Assistant for a while now and your {% term "`configura
## Example configuration files for inspiration
First off, several community members have sanitized (read: without API keys/passwords) versions of their configurations available for viewing. You can see a [list of example files here](/examples/#example-configurationyaml).
First off, several community members have sanitized (read: without API keys/passwords) versions of their configurations available for viewing. You can see a [list of example configuration on GitHub](https://github.com/search?q=topic%3Ahome-assistant-config&type=Repositories).
As commenting code doesn't always happen, please read on to learn in detail how configuration files can be structured.

View File

@ -19,7 +19,3 @@ The frontend is built with [Polymer](https://www.polymer-project.org/).
## Icons
Home Assistant utilizes the community-driven [Material Design Icons](https://pictogrammers.com/library/mdi/) project for icons in the frontend. The [Icons section](/docs/frontend/icons/) has more information on how to use icons and suggest new ones.
## Examples
The [User Interface section](/examples/#user-interface) can give you some starting points to expand the frontend.

View File

@ -1,6 +0,0 @@
---
title: "Configuration.yaml by DrJohnT"
description: "Velux windows, Drayton Wiser heating, Audio / Visual, lighting and humidity controlled fans"
ha_category: Example configuration.yaml
ha_external_link: https://github.com/DrJohnT/HomeAssistantPublicConfig
---

View File

@ -1,6 +0,0 @@
---
title: "Configuration.yaml by Alok Saboo"
description: ""
ha_category: Example configuration.yaml
ha_external_link: https://github.com/arsaboo/homeassistant-config
---

View File

@ -1,7 +0,0 @@
---
title: "Configuration.yaml by aneisch"
description: ""
ha_category: Example configuration.yaml
ha_external_link: https://github.com/aneisch/home-assistant-config/
---

View File

@ -1,6 +0,0 @@
---
title: "Configuration.yaml by Apocrathia"
description: ""
ha_category: Example configuration.yaml
ha_external_link: https://github.com/Apocrathia/home-assistant-config/
---

View File

@ -1,7 +0,0 @@
---
title: "Configuration.yaml by Carlo Costanzo"
description: ""
ha_category: Example configuration.yaml
ha_external_link: https://github.com/CCOSTAN/Home-AssistantConfig
---

View File

@ -1,6 +0,0 @@
---
title: "Configuration.yaml by cy1701"
description: ""
ha_category: Example configuration.yaml
ha_external_link: https://github.com/cy1701/Home-Assistant-Configuration
---

View File

@ -1,6 +0,0 @@
---
title: "Configuration.yaml by dannytsang"
description: ""
ha_category: Example configuration.yaml
ha_external_link: https://github.com/dannytsang/homeassistant-config
---

View File

@ -1,7 +0,0 @@
---
title: "Configuration.yaml by geekofweek"
description: ""
ha_category: Example configuration.yaml
ha_external_link: https://github.com/geekofweek/homeassistant
---

View File

@ -1,6 +0,0 @@
---
title: "Configuration.yaml by jimpower"
description: ""
ha_category: Example configuration.yaml
ha_external_link: https://github.com/JamesMcCarthy79/Home-Assistant-Config
---

View File

@ -1,6 +0,0 @@
---
title: "Configuration.yaml by Jonathan Adams"
description: ""
ha_category: Example configuration.yaml
ha_external_link: https://github.com/jonathanadams/Home-Assistant-Configuration
---

View File

@ -1,6 +0,0 @@
---
title: "Configuration.yaml by klaasnicolaas"
description: ""
ha_category: Example configuration.yaml
ha_external_link: https://github.com/klaasnicolaas/Student-homeassistant-config
---

View File

@ -1,6 +0,0 @@
---
title: "Configuration.yaml by mcaminiti"
description: ""
ha_category: Example configuration.yaml
ha_external_link: https://github.com/mcaminiti/homeassistant
---

View File

@ -1,6 +0,0 @@
---
title: "Configuration.yaml by ntalekt"
description: "Unifi, ZHA, Pentair, Tuya, Tasmota"
ha_category: Example configuration.yaml
ha_external_link: https://github.com/ntalekt/homeassistant
---

View File

@ -1,6 +0,0 @@
---
title: "Configuration.yaml by omerome83"
description: ""
ha_category: Example configuration.yaml
ha_external_link: https://github.com/omerome83/homeassistant
---

View File

@ -1,6 +0,0 @@
---
title: "Configuration.yaml by Shortbloke"
description: ""
ha_category: Example configuration.yaml
ha_external_link: https://github.com/shortbloke/home_assistant_config
---

View File

@ -1,6 +0,0 @@
---
title: "Configuration.yaml by Mahasri Kalavala (@skalavala)"
description: ""
ha_category: Example configuration.yaml
ha_external_link: https://github.com/skalavala/mysmarthome
---

View File

@ -1,6 +0,0 @@
---
title: "Configuration.yaml by Tinkerer"
description: ""
ha_category: Example configuration.yaml
ha_external_link: https://github.com/DubhAd/Home-AssistantConfig/
---

View File

@ -1,6 +0,0 @@
---
title: "Configuration.yaml by ubhits (HA 'Steroids' Config)"
description: ""
ha_category: Example configuration.yaml
ha_external_link: https://github.com/UbhiTS/ha-config-ataraxis
---

View File

@ -1,31 +0,0 @@
---
title: "Show Google Maps as a card"
description: "Example how to show a Google Map as a Google card."
ha_category: User Interface
---
Using the [generic camera platform] you can present any image on the internet as a camera. Starting release 0.27 these URLs can also be based on a template. This example uses this functionality to point a generic camera at the Google Maps static image API and pass in the location of a device.
As of June 2018, Google has changed the API limits for static maps. You now need to have a Google Maps API key. Instructions for registering a key can be found [here](https://github.com/googlemaps/google-maps-services-python#api-keys). Replace `YOUR_API_KEY` with the key you registered.
It also leverages the `limit_refetch_to_url_change` option to ensure that we do not make a lot of requests to the Google Maps API.
{% raw %}
```yaml
# Example configuration.yaml entry.
# Shows device_tracker.demo_paulus on a map.
camera:
name: Paulus
platform: generic
still_image_url: https://maps.googleapis.com/maps/api/staticmap?center={{ state_attr('device_tracker.demo_paulus', 'latitude') }},{{ state_attr('device_tracker.demo_paulus', 'longitude') }}&zoom=13&size=500x500&maptype=roadmap&markers=color:blue%7Clabel:P%7C{{ state_attr('device_tracker.demo_paulus', 'latitude') }},{{ state_attr('device_tracker.demo_paulus', 'longitude') }}&key=YOUR_API_KEY
limit_refetch_to_url_change: true
```
{% endraw %}
<p class='img'>
<img src='/images/integrations/camera/generic-google-maps.png' alt='Screenshot showing Google Maps integration in Home Assistant front end.'>
</p>
[generic camera platform]: /integrations/generic_ip_camera

View File

@ -45,7 +45,6 @@
</ul>
</li>
<li><a href="/integrations/">Integrations</a></li>
<li><a href="/examples/">Examples</a></li>
<li><a href="/blog/">Blog</a></li>
<li><a href="/help/">Need help?</a></li>
<li>

View File

@ -9,7 +9,7 @@ categories: Community Video
og_image: /images/blog/2016-02-community-highlights/part-of-the-thing.png
---
Home Assistant land has been busy and a lot of people have been creating awesome stuff. We've added [a cookbook section](/examples/) to the website full of examples how you can automate different things. Make sure you take a look and share your own recipes too!
Home Assistant land has been busy and a lot of people have been creating awesome stuff.
### Home automation demo by Part of the Thing

View File

@ -391,6 +391,7 @@ layout: null
/common-tasks/supervised/#snapshots /common-tasks/supervised/#backups
/more-info/unsupported/container /more-info/unsupported/software
/integrations/zigbee /integrations/zha
/examples /
# Moved marketing pages / rebranding
/skyconnect /connectzbt1

View File

@ -1,51 +0,0 @@
---
title: "Examples"
description: "Community maintained list of different ways to use Home Assistant."
sidebar: false
feedback: false
---
This is a community curated list of different ways to use Home Assistant. Most
of these examples are using [the automation integration][automations].
<div class='note'>
A great place to find popular configurations is on this
[GitHub search][github-search] for repositories with the
`home-assistant-config` topic.
</div>
[automations]: /getting-started/automation/
[github-search]: https://github.com/search?q=topic%3Ahome-assistant-config&type=Repositories
## Popular Blueprints
This is a list of the most popular [blueprints](/docs/automation/using_blueprints/) in the [Blueprint Exchange category on the forums](https://www.home-assistant.io/get-blueprints).
{% for post in site.data.blueprint_exchange_data limit:25 %}
- [{{post.title}}](https://community.home-assistant.io/t/{{post.id}})
{%- for tag in post.tags %}
[`{{tag}}`](https://community.home-assistant.io/tag/{{tag}})
{%- endfor -%}
{% endfor %}
{% assign examples = site.examples | sort: 'title' %}
{% assign categories = examples | map: 'ha_category' | uniq | sort %}
{% for category in categories %}
## {{ category }}
{% for recipe in examples %}
{% if recipe.ha_category == category %}
{% if recipe.ha_external_link %}
- [{{recipe.title}} <i class="icon-external-link"></i>]({{recipe.ha_external_link}})
{% else %}
- [{{recipe.title}}]({{recipe.url}})
{% endif %}
{% endif %}
{% endfor %}
{% endfor %}