diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml index 708db414..d7389cf7 100644 --- a/.github/workflows/release-please.yaml +++ b/.github/workflows/release-please.yaml @@ -1,4 +1,4 @@ -on: +on: # yamllint disable-line rule:truthy push: branches: - main diff --git a/.yamllint.yaml b/.yamllint.yaml index 80365fb6..7f42f940 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -15,3 +15,4 @@ ignore: | pyscript/ automations.yaml scenes.yaml + ui-lovelace.yaml diff --git a/README.md b/README.md index 90249243..eed8cb62 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,63 @@ I have installed HA on a [Fujitsu Esprimo Q920](https://www.amazon.it/gp/product I regularly update my configuration files. You can check my current Home Assistant version [here](.HA_VERSION). + +## Some statistics about my installation: + +Description | value +-- | -- +Number of entities | 264 +Number of sensors | 105 + + +## My installed extensions: + +### Add-ons +- Advanced SSH & Web Terminal +- File editor +- Home Assistant Google Drive Backup +- Mosquitto broker +- RPC Shutdown +- Samba share +- Zigbee2MQTT + +### Custom integrations +- [Adaptive Lighting](https://github.com/basnijholt/adaptive-lighting) +- [Alexa Media Player](https://github.com/custom-components/alexa_media_player) +- [Generate Readme](https://github.com/custom-components/readme) +- [HACS](https://github.com/hacs/integration) +- [Openrgb](https://github.com/koying/openrgb_ha) +- [Pyscript](https://github.com/custom-components/pyscript) +- [Smartir](https://github.com/smartHomeHub/SmartIR) +- [Spotcast](https://github.com/fondberg/spotcast) + +### Lovelace plugins +- [Garbage Collection Card](https://github.com/amaximus/garbage-collection-card) +- [Layout Card](https://github.com/thomasloven/lovelace-layout-card) +- [Mini Graph Card](https://github.com/kalkih/mini-graph-card) +- [Mushroom](https://github.com/piitaya/lovelace-mushroom) +- [Simple Weather Card](https://github.com/kalkih/simple-weather-card) +- [Spotify Lovelace Card](https://github.com/custom-cards/spotify-card) +- [State Switch](https://github.com/thomasloven/lovelace-state-switch) +- [Wallpanel](https://github.com/j-a-n/lovelace-wallpanel) + +### Themes +- [Mushroom Themes](https://github.com/piitaya/lovelace-mushroom-themes) + + +## Lovelace +**NOTE:** I moved my entire configuration to Lovelace UI editor, [ui-lovelace.yaml](ui-lovelace.yaml) is auto-generated. + +### Mobile +![Home](docs/images/home.jpg) +![Livingroom](docs/images/livingroom.jpg) +![Bedroom](docs/images/bedroom.jpg) +![Kitchen](docs/images/kitchen.jpg) +![Home Lab](docs/images/home_lab.jpg) +![Entrance](docs/images/entrance.jpg) +![Bathroom](docs/images/bathroom.jpg) + + ## Other things that I run on my Home Server - [AdGuard Home](https://adguard.com/en/adguard-home/overview.html) LXC - [Transmission](https://transmissionbt.com/) LXC @@ -36,18 +93,6 @@ I regularly update my configuration files. You can check my current Home Assista > smart bulbs, led strips, temperature and humidity sensors, smart plugs list and missing links incoming... -## Software Integrations -> WIP - -## Lovelace -**NOTE:** I moved my entire configuration to Lovelace UI editor, so YAMLs could be a bit outdated. I will try to update them regularly to reflect the latest changes. +*** -### Mobile -(current theme: [Mushroom Theme](https://github.com/piitaya/lovelace-mushroom-themes) with [Mushroom](https://github.com/piitaya/lovelace-mushroom) cards) -![Home](docs/images/home.jpg) -![Livingroom](docs/images/livingroom.jpg) -![Bedroom](docs/images/bedroom.jpg) -![Kitchen](docs/images/kitchen.jpg) -![Home Lab](docs/images/home_lab.jpg) -![Entrance](docs/images/entrance.jpg) -![Bathroom](docs/images/bathroom.jpg) +Generated by the [custom readme integration](https://github.com/custom-components/readme) \ No newline at end of file diff --git a/configuration.yaml b/configuration.yaml index 8fc17a58..79f99893 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -92,3 +92,6 @@ ifttt: duckdns: domain: !secret duckdns.subdomain access_token: !secret duckdns.access_token + +readme: + convert_lovelace: true diff --git a/custom_components/readme/__init__.py b/custom_components/readme/__init__.py new file mode 100644 index 00000000..e8a7271e --- /dev/null +++ b/custom_components/readme/__init__.py @@ -0,0 +1,251 @@ +""" +Use Jinja and data from Home Assistant to generate your README.md file + +For more details about this component, please refer to +https://github.com/custom-components/readme +""" +from __future__ import annotations + +import asyncio +import json +import os +from shutil import copyfile +from typing import Any, Dict, List + +import homeassistant.helpers.config_validation as cv +import voluptuous as vol +import yaml +from homeassistant import config_entries +from homeassistant.core import callback, HomeAssistant +from homeassistant.helpers.template import AllStates +from homeassistant.loader import Integration, IntegrationNotFound, async_get_integration +from homeassistant.setup import async_get_loaded_integrations +from jinja2 import Template + + +from .const import DOMAIN, DOMAIN_DATA, LOGGER, STARTUP_MESSAGE + +CONFIG_SCHEMA = vol.Schema( + {DOMAIN: vol.Schema({vol.Optional("convert_lovelace"): cv.boolean})}, + extra=vol.ALLOW_EXTRA, +) + + +async def async_setup(hass: HomeAssistant, config: dict): + """Set up this component using YAML.""" + if config.get(DOMAIN) is None: + # We get her if the integration is set up using config flow + return True + + # Print startup message + LOGGER.info(STARTUP_MESSAGE) + + # Create DATA dict + hass.data.setdefault(DOMAIN_DATA, config[DOMAIN]) + + await add_services(hass) + + def _create_initial_files(): + create_initial_files(hass) + + await hass.async_add_executor_job(_create_initial_files) + + hass.async_create_task( + hass.config_entries.flow.async_init( + DOMAIN, context={"source": config_entries.SOURCE_IMPORT}, data={} + ) + ) + return True + + +async def async_setup_entry(hass: HomeAssistant, config_entry): + """Set up this integration using UI.""" + if config_entry.source == config_entries.SOURCE_IMPORT: + if hass.data.get(DOMAIN_DATA) is None: + hass.async_create_task( + hass.config_entries.async_remove(config_entry.entry_id) + ) + return True + + # Print startup message + LOGGER.info(STARTUP_MESSAGE) + + # Create DATA dict + hass.data[DOMAIN_DATA] = config_entry.data + + await add_services(hass) + + def _create_initial_files(): + create_initial_files(hass) + + await hass.async_add_executor_job(_create_initial_files) + + return True + + +def create_initial_files(hass: HomeAssistant): + """Create the initial files for this integration.""" + if not os.path.exists(hass.config.path("templates")): + os.mkdir(hass.config.path("templates")) + + if not os.path.exists(hass.config.path("templates/README.j2")): + + copyfile( + hass.config.path("custom_components/readme/default.j2"), + hass.config.path("templates/README.j2"), + ) + + +async def convert_lovelace(hass: HomeAssistant): + """Convert the lovelace configuration.""" + if os.path.exists(hass.config.path(".storage/lovelace")): + content = ( + json.loads(await read_file(hass, ".storage/lovelace") or {}) + .get("data", {}) + .get("config", {}) + ) + + await write_file(hass, "ui-lovelace.yaml", content, as_yaml=True) + + +async def async_remove_entry(hass: HomeAssistant, config_entry): + """Handle removal of an entry.""" + hass.services.async_remove(DOMAIN, "generate") + hass.data.pop(DOMAIN_DATA) + + +async def read_file(hass: HomeAssistant, path: str) -> Any: + """Read a file.""" + + def read(): + with open(hass.config.path(path), "r") as open_file: + return open_file.read() + + return await hass.async_add_executor_job(read) + + +async def write_file( + hass: HomeAssistant, path: str, content: Any, as_yaml=False +) -> None: + """Write a file.""" + + def write(): + with open(hass.config.path(path), "w") as open_file: + if as_yaml: + yaml.dump(content, open_file, default_flow_style=False, allow_unicode=True) + else: + open_file.write(content) + + await hass.async_add_executor_job(write) + + +async def add_services(hass: HomeAssistant): + """Add services.""" + # Service registration + + async def service_generate(_call): + """Generate the files.""" + if hass.data[DOMAIN_DATA].get("convert") or hass.data[DOMAIN_DATA].get( + "convert_lovelace" + ): + await convert_lovelace(hass) + + custom_components = await get_custom_integrations(hass) + hacs_components = get_hacs_components(hass) + installed_addons = get_ha_installed_addons(hass) + + variables = { + "custom_components": custom_components, + "states": AllStates(hass), + "hacs_components": hacs_components, + "addons": installed_addons, + } + + content = await read_file(hass, "templates/README.j2") + + template = Template(content) + try: + render = template.render(variables) + await write_file(hass, "README.md", render) + except Exception as exception: + LOGGER.error(exception) + + hass.services.async_register(DOMAIN, "generate", service_generate) + + +def get_hacs_components(hass: HomeAssistant): + if (hacs := hass.data.get("hacs")) is None: + return [] + + return [ + { + **repo.data.to_json(), + "name": get_repository_name(repo), + "documentation": f"https://github.com/{repo.data.full_name}", + } + for repo in hacs.repositories.list_downloaded or [] + ] + + +@callback +def get_ha_installed_addons(hass: HomeAssistant) -> List[Dict[str, Any]]: + if not hass.components.hassio.is_hassio(): + return [] + supervisor_info = hass.components.hassio.get_supervisor_info() + + if supervisor_info: + return supervisor_info.get("addons", []) + return [] + + +def get_repository_name(repository) -> str: + """Return the name of the repository for use in the frontend.""" + name = None + + if repository.repository_manifest.name: + name = repository.repository_manifest.name + else: + name = repository.data.full_name.split("/")[-1] + + name = name.replace("-", " ").replace("_", " ").strip() + + if name.isupper(): + return name + + return name.title() + + +async def get_custom_integrations(hass: HomeAssistant): + """Return a list with custom integration info.""" + custom_integrations = [] + configured_integrations: List[ + Integration | IntegrationNotFound | BaseException + ] = await asyncio.gather( + *[ + async_get_integration(hass, domain) + for domain in async_get_loaded_integrations(hass) + ], + return_exceptions=True, + ) + + for integration in configured_integrations: + if isinstance(integration, IntegrationNotFound): + continue + + if isinstance(integration, BaseException): + raise integration + + if integration.disabled or integration.is_built_in: + continue + + custom_integrations.append( + { + "domain": integration.domain, + "name": integration.name, + "documentation": integration.documentation, + "version": integration.version, + "codeowners": integration.manifest.get("codeowners"), + } + ) + + return custom_integrations diff --git a/custom_components/readme/config_flow.py b/custom_components/readme/config_flow.py new file mode 100644 index 00000000..caf4f49e --- /dev/null +++ b/custom_components/readme/config_flow.py @@ -0,0 +1,60 @@ +"""Adds config flow for Readme.""" +from collections import OrderedDict + +import voluptuous as vol +from homeassistant import config_entries + +from .const import DOMAIN + + +@config_entries.HANDLERS.register(DOMAIN) +class ReadmeFlowHandler(config_entries.ConfigFlow): + """Config flow for Readme.""" + + VERSION = 1 + CONNECTION_CLASS = config_entries.CONN_CLASS_LOCAL_POLL + + def __init__(self): + """Initialize.""" + self._errors = {} + + async def async_step_user( + self, user_input={} + ): # pylint: disable=dangerous-default-value + """Handle a flow initialized by the user.""" + self._errors = {} + if self._async_current_entries(): + return self.async_abort(reason="single_instance_allowed") + if self.hass.data.get(DOMAIN): + return self.async_abort(reason="single_instance_allowed") + + if user_input is not None: + return self.async_create_entry(title="", data=user_input) + + return await self._show_config_form(user_input) + + async def _show_config_form(self, user_input): + """Show the configuration form to edit data.""" + + # Defaults + convert = False + + if user_input is not None: + if "convert" in user_input: + convert = user_input["convert"] + + data_schema = OrderedDict() + data_schema[vol.Required("convert", default=convert)] = bool + return self.async_show_form( + step_id="user", data_schema=vol.Schema(data_schema), errors=self._errors + ) + + async def async_step_import(self, user_input): # pylint: disable=unused-argument + """Import a config entry. + Special type of import, we're not actually going to store any data. + Instead, we're going to rely on the values that are in config file. + """ + if self._async_current_entries(): + return self.async_abort(reason="single_instance_allowed") + + return self.async_create_entry(title="configuration.yaml", data={}) diff --git a/custom_components/readme/const.py b/custom_components/readme/const.py new file mode 100644 index 00000000..3cd1cc6d --- /dev/null +++ b/custom_components/readme/const.py @@ -0,0 +1,21 @@ +"""Constants for readme.""" +import logging + +LOGGER: logging.Logger = logging.getLogger(__package__) + +DOMAIN = "readme" +DOMAIN_DATA = "readme_data" +INTEGRATION_VERSION = "0.5.0" + +ISSUE_URL = "https://github.com/custom-components/readme/issues" + + +STARTUP_MESSAGE = f""" +------------------------------------------------------------------- +{DOMAIN} +Version: {INTEGRATION_VERSION} +This is a custom integration +If you have any issues with this you need to open an issue here: +{ISSUE_URL} +------------------------------------------------------------------- +""" \ No newline at end of file diff --git a/custom_components/readme/default.j2 b/custom_components/readme/default.j2 new file mode 100644 index 00000000..317f0652 --- /dev/null +++ b/custom_components/readme/default.j2 @@ -0,0 +1,38 @@ +# Welcome ! + +This is my Home Assistant installation. + +## Some statistics about my installation: + +Description | value +-- | -- +Number of entities | {{states | count}} +Number of sensors | {{states.sensor | count}} + + +## My installed extensions: + +### Add-ons +{%- for addon in addons | sort(attribute='name') %} +- {{addon.name}} +{%- endfor %} + +### Custom integrations +{%- for component in hacs_components | selectattr('category', 'equalto', 'integration') | sort(attribute='name') %} +- [{{component.name}}]({{component.documentation}}) +{%- endfor %} + +### Lovelace plugins +{%- for component in hacs_components | selectattr('category', 'equalto', 'plugin') | sort(attribute='name') %} +- [{{component.name}}]({{component.documentation}}) +{%- endfor %} + +### Themes +{%- for component in hacs_components | selectattr('category', 'equalto', 'theme') | sort(attribute='name') %} +- [{{component.name}}]({{component.documentation}}) +{%- endfor %} + + +*** + +Generated by the [custom readme integration](https://github.com/custom-components/readme) diff --git a/custom_components/readme/manifest.json b/custom_components/readme/manifest.json new file mode 100644 index 00000000..cb3fde95 --- /dev/null +++ b/custom_components/readme/manifest.json @@ -0,0 +1,12 @@ +{ + "domain": "readme", + "name": "Generate readme", + "version": "0.5.0", + "documentation": "https://github.com/custom-components/readme", + "issue_tracker": "https://github.com/custom-components/issues", + "config_flow": true, + "codeowners": [ + "@ludeeus" + ], + "iot_class": "calculated" +} diff --git a/custom_components/readme/services.yaml b/custom_components/readme/services.yaml new file mode 100644 index 00000000..2b818194 --- /dev/null +++ b/custom_components/readme/services.yaml @@ -0,0 +1,2 @@ +generate: + description: Generates the README.md file diff --git a/custom_components/readme/translations/en.json b/custom_components/readme/translations/en.json new file mode 100644 index 00000000..d52722f1 --- /dev/null +++ b/custom_components/readme/translations/en.json @@ -0,0 +1,16 @@ +{ + "config": { + "step": { + "user": { + "title": "Generate readme", + "description": "If you need help with the configuration have a look here: https://github.com/custom-components/readme", + "data": { + "convert": "Convert lovelace configuration" + } + } + }, + "abort": { + "single_instance_allowed": "Only a single configuration of Readme is allowed." + } + } +} diff --git a/lovelace.yaml b/lovelace.yaml deleted file mode 100644 index 0d3a04b9..00000000 --- a/lovelace.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# mode: yaml -resources: - - url: /hacsfiles/mini-graph-card/mini-graph-card-bundle.js - type: module - - url: /hacsfiles/slider-button-card/slider-button-card.js - type: module - - url: /hacsfiles/spotify-card/spotify-card.js - type: module - - url: /hacsfiles/button-card/button-card.js - type: module - - url: /hacsfiles/decluttering-card/decluttering-card.js - type: module - - url: /hacsfiles/lovelace-auto-entities/auto-entities.js - type: module - - url: /hacsfiles/lovelace-card-mod/card-mod.js - type: module - - url: /hacsfiles/mini-media-player/mini-media-player-bundle.js - type: module - - url: /hacsfiles/my-cards/my-cards.js - type: module - - url: /hacsfiles/light-entity-card/light-entity-card.js - type: module - - url: /hacsfiles/simple-weather-card/simple-weather-card-bundle.js - type: module - - url: /hacsfiles/garbage-collection-card/garbage-collection-card.js - type: module - - url: /hacsfiles/lovelace-mushroom/mushroom.js - type: module diff --git a/lovelace/000_home_view.yaml b/lovelace/000_home_view.yaml deleted file mode 100644 index 7a3317ff..00000000 --- a/lovelace/000_home_view.yaml +++ /dev/null @@ -1,187 +0,0 @@ -path: default_view -icon: mdi:home-assistant -badges: - - type: state-label - entity: person.aronne - name: "" - - type: state-label - entity: person.valentina - name: "" - - type: state-label - entity: sensor.home_temperature - name: "" - - type: state-label - entity: sensor.home_humidity - name: "" - - type: state-label - entity: sensor.frient_energy_monitor_power - name: "" - - type: state-label - entity: sensor.daily_energy - name: "" -cards: - # Forecast - - type: weather-forecast - entity: weather.casa - show_forecast: true - # Rooms - - type: vertical-stack - cards: - - type: custom:mushroom-title-card - title: Soggiorno - - type: custom:mushroom-chips-card - chips: - - type: template - icon: mdi:arrow-right - tap_action: - action: navigate - navigation_path: /lovelace/livingroom - - type: entity - entity: sensor.termometro_sala_temperature - - type: entity - entity: sensor.termometro_sala_humidity - - type: entity - entity: media_player.echo_sala - - type: horizontal-stack - cards: - - type: custom:mushroom-light-card - entity: light.livingroom - name: Luce - primary_info: name - secondary_info: state - tap_action: - action: toggle - icon_color: yellow - - type: custom:mushroom-entity-card - entity: switch.livingroom_tv - icon: mdi:television-classic - primary_info: name - secondary_info: state - tap_action: - action: toggle - - type: vertical-stack - cards: - - type: custom:mushroom-title-card - title: Camera da letto - - type: custom:mushroom-chips-card - chips: - - type: template - icon: mdi:arrow-right - tap_action: - action: navigate - navigation_path: /lovelace/bedroom - - type: entity - entity: sensor.termometro_camera_temperature - - type: entity - entity: sensor.termometro_camera_humidity - - type: entity - entity: media_player.echo_dot_camera - - type: horizontal-stack - cards: - - type: custom:mushroom-light-card - entity: light.bedroom - name: Luce - primary_info: name - secondary_info: state - tap_action: - action: toggle - icon_color: yellow - - type: custom:mushroom-entity-card - entity: switch.gaming_station - icon: mdi:desktop-classic - name: PC - primary_info: name - secondary_info: state - tap_action: - action: toggle - - type: vertical-stack - cards: - - type: custom:mushroom-title-card - title: Cucina - - type: custom:mushroom-chips-card - chips: - - type: template - icon: mdi:arrow-right - tap_action: - action: navigate - navigation_path: /lovelace/kitchen - - type: entity - entity: media_player.echo_show_cucina - - type: horizontal-stack - cards: - - type: custom:mushroom-entity-card - entity: calendar.garbage_collection - icon: mdi:trash-can - primary_info: name - secondary_info: state - name: Raccolta rifiuti domani - icon_color: red - tap_action: - action: navigate - navigation_path: /lovelace/kitchen - - type: custom:mushroom-entity-card - entity: sensor.frient_energy_monitor_power - primary_info: name - secondary_info: state - name: Consumo istantaneo - icon_color: purple - - type: vertical-stack - cards: - - type: custom:mushroom-title-card - title: Ingresso - - type: custom:mushroom-chips-card - chips: - - type: template - icon: mdi:arrow-right - tap_action: - action: navigate - navigation_path: /lovelace/entrance - - type: horizontal-stack - cards: - - type: custom:mushroom-light-card - entity: light.entrance - primary_info: name - secondary_info: state - name: Luce - icon_color: yellow - tap_action: - action: toggle - - type: vertical-stack - cards: - - type: custom:mushroom-title-card - title: Home lab - - type: custom:mushroom-chips-card - chips: - - type: template - icon: mdi:arrow-right - tap_action: - action: navigate - navigation_path: /lovelace/services - - type: entity - entity: sensor.proxmox_cpu_usage - icon: mdi:memory - - type: entity - entity: sensor.proxmox_memory_usage - icon: mdi:chip - - type: entity - entity: sensor.speedtest_download - icon: mdi:download - - type: horizontal-stack - cards: - - type: custom:mushroom-template-card - entity: switch.dummy_switch - icon: mdi:monitor-dashboard - primary: Dashy - icon_color: green - tap_action: - action: url - url_path: !secret dashy.url - # Spotify - - type: vertical-stack - cards: - - type: custom:mushroom-title-card - title: Media player - - type: horizontal-stack - cards: - - type: media-control - entity: media_player.spotify_aronne_brivio diff --git a/lovelace/001_shopping_list_view.yaml b/lovelace/001_shopping_list_view.yaml deleted file mode 100644 index b43584e0..00000000 --- a/lovelace/001_shopping_list_view.yaml +++ /dev/null @@ -1,7 +0,0 @@ -path: shopping_list -icon: mdi:basket -type: panel -badges: [] -cards: - - type: shopping-list - title: Lista della spesa diff --git a/lovelace/002_livingroom_view.yaml b/lovelace/002_livingroom_view.yaml deleted file mode 100644 index b3e02725..00000000 --- a/lovelace/002_livingroom_view.yaml +++ /dev/null @@ -1,139 +0,0 @@ -path: livingroom -icon: mdi:sofa -badges: [] -cards: - # Header - # - type: picture - # image: /local/images/rooms/livingroom.jpg - # Smart Home - - type: vertical-stack - cards: - - type: custom:mushroom-title-card - title: Smart home - - type: horizontal-stack - cards: - - type: custom:mushroom-entity-card - entity: switch.livingroom_tv - icon: mdi:television-classic - primary_info: name - secondary_info: state - name: TV - tap_action: - action: toggle - - type: custom:mushroom-light-card - entity: light.spada_suprema - icon: mdi:sword - primary_info: name - secondary_info: state - name: Spada Suprema - icon_color: yellow - tap_action: - action: toggle - - type: custom:mushroom-light-card - entity: light.piantana_sala - icon: mdi:floor-lamp-torchiere - primary_info: name - secondary_info: state - icon_color: yellow - name: Piantana - show_brightness_control: true - - type: vertical-stack - cards: - - type: custom:mushroom-title-card - title: Sensori - - type: custom:mini-graph-card - # Temperature - entities: - - entity: sensor.termometro_sala_temperature - show_legend: false - - entity: sun.sun - color: gray - name: Night - show_line: false - show_points: false - show_legend: false - y_axis: secondary - name: Temperatura - animate: true - show: - labels: true - labels_secondary: true - state_map: - - value: below_horizon - label: Night - - value: above_horizon - label: Day - color_thresholds: - - value: 20 - color: "#f39c12" - - value: 21 - color: "#d35400" - - value: 21.5 - color: "#c0392b" - hours_to_show: 168 - points_per_hour: 0.25 - - type: custom:mini-graph-card - # Umidity - entities: - - entity: sensor.termometro_sala_humidity - show_legend: false - color: "#89cff0" - - entity: sun.sun - color: gray - name: Night - show_line: false - show_points: false - show_legend: false - y_axis: secondary - name: Umidità - animate: true - show: - labels: true - labels_secondary: true - state_map: - - value: below_horizon - label: Night - - value: above_horizon - label: Day - hours_to_show: 168 - points_per_hour: 0.25 - - type: vertical-stack - cards: - - type: custom:mushroom-title-card - title: Media player - # Fire TV - - type: media-control - entity: media_player.firestick - # Echo - - type: media-control - entity: media_player.echo_sala - # Other - - type: vertical-stack - cards: - - type: custom:mushroom-title-card - title: Extra - - type: horizontal-stack - cards: - - type: custom:mushroom-light-card - entity: light.piantana_sala_luce_grande - icon: mdi:floor-lamp-torchiere - primary_info: name - secondary_info: state - icon_color: yellow - name: Grande - show_brightness_control: true - - type: custom:mushroom-light-card - entity: light.piantana_sala_luce_piccola - icon: mdi:floor-lamp - primary_info: name - secondary_info: state - name: Piccola - icon_color: yellow - show_brightness_control: true - - type: entities - title: Circadian Lighting - entities: - - entity: switch.circadian_lighting_piantana_luce_grande - name: Piantana Luce Grande - - entity: switch.circadian_lighting_piantana_luce_piccola - name: Piantana Luce Piccola diff --git a/lovelace/003_bedroom_view.yaml b/lovelace/003_bedroom_view.yaml deleted file mode 100644 index f78a9476..00000000 --- a/lovelace/003_bedroom_view.yaml +++ /dev/null @@ -1,152 +0,0 @@ -path: bedroom -icon: mdi:bed-king -badges: [] -cards: - # Header - # - type: picture - # image: /local/images/rooms/bedroom.jpg - - type: vertical-stack - cards: - - type: custom:mushroom-title-card - title: Smart home - - type: horizontal-stack - # Bed - cards: - - type: custom:mushroom-light-card - entity: light.abat_jour_letto_sinistra - icon: mdi:floor-lamp - primary_info: name - secondary_info: state - name: Letto Nennè - tap_action: - action: toggle - show_brightness_control: true - - type: horizontal-stack - # Station - cards: - - type: custom:mushroom-entity-card - entity: switch.work_station - icon: mdi:account-hard-hat - primary_info: name - secondary_info: state - name: "Work Station" - tap_action: - action: toggle - - type: custom:mushroom-entity-card - entity: switch.gaming_station - icon: mdi:google-controller - primary_info: name - secondary_info: state - name: "Gaming Station" - tap_action: - action: toggle - # Work/Gaming station - - type: vertical-stack - cards: - - type: custom:mushroom-title-card - title: Scrivania - - type: horizontal-stack - cards: - - type: custom:mushroom-light-card - entity: light.luce_scrivania - color: yellow - icon: mdi:led-strip-variant - tap_action: - action: toggle - name: Luce - show_brightness_control: true - - type: horizontal-stack - cards: - - type: custom:mushroom-entity-card - entity: switch.fisso - icon: mdi:desktop-classic - tap_action: - action: toggle - name: PC - color: green - - type: custom:mushroom-entity-card - entity: switch.casse_pc - icon: mdi:speaker - tap_action: - action: toggle - name: Casse - color: purple - - type: vertical-stack - cards: - - type: custom:mushroom-title-card - title: Sensori - # Temperature - - type: custom:mini-graph-card - entities: - - entity: sensor.termometro_camera_temperature - show_legend: false - - entity: sun.sun - color: gray - name: Night - show_line: false - show_points: false - show_legend: false - y_axis: secondary - name: Temperatura - animate: true - show: - labels: true - labels_secondary: true - state_map: - - value: below_horizon - label: Night - - value: above_horizon - label: Day - color_thresholds: - - value: 20 - color: "#f39c12" - - value: 21 - color: "#d35400" - - value: 21.5 - color: "#c0392b" - hours_to_show: 168 - points_per_hour: 0.25 - # Umidity - - type: custom:mini-graph-card - entities: - - entity: sensor.termometro_camera_humidity - show_legend: false - color: "#89cff0" - - entity: sun.sun - color: gray - name: Night - show_line: false - show_points: false - show_legend: false - y_axis: secondary - name: Umidità - animate: true - show: - labels: true - labels_secondary: true - state_map: - - value: below_horizon - label: Night - - value: above_horizon - label: Day - hours_to_show: 168 - points_per_hour: 0.25 - - type: vertical-stack - cards: - - type: custom:mushroom-title-card - title: Media player - # Echo Dot - - type: media-control - entity: media_player.echo_dot_camera - # Other - - type: vertical-stack - cards: - - type: custom:mushroom-title-card - title: Extra - - type: entities - title: Circadian Lighting - entities: - - entity: switch.circadian_lighting_studio - name: Scrivania - - entity: switch.circadian_lighting_abat_jour_letto_sinistra - name: Luce Nennè diff --git a/lovelace/004_kitchen_view.yaml b/lovelace/004_kitchen_view.yaml deleted file mode 100644 index 7d0d8603..00000000 --- a/lovelace/004_kitchen_view.yaml +++ /dev/null @@ -1,69 +0,0 @@ -path: kitchen -icon: mdi:chef-hat -badges: [] -cards: - # Header - #- type: picture - # image: /local/images/rooms/kitchen.jpg - # Garbage Collection - #- cards: - # - type: custom:garbage-collection-card - # entity: sensor.garbage_collection_trash - # hide_on_click: false - # - type: custom:garbage-collection-card - # entity: sensor.garbage_collection_organic - # hide_on_click: false - # - type: custom:garbage-collection-card - # entity: sensor.garbage_collection_paper - # hide_on_click: false - # - type: custom:garbage-collection-card - # entity: sensor.garbage_collection_plastic - # hide_on_click: false - # - type: custom:garbage-collection-card - # entity: sensor.garbage_collection_glass_and_metal - # hide_on_click: false - # type: vertical-stack - - type: vertical-stack - cards: - - type: custom:mushroom-title-card - title: Raccolta rifiuti - - type: grid - cards: - - type: custom:mushroom-entity-card - entity: sensor.garbage_collection_trash - - type: custom:mushroom-entity-card - entity: sensor.garbage_collection_organic - - type: custom:mushroom-entity-card - entity: sensor.garbage_collection_paper - - type: custom:mushroom-entity-card - entity: sensor.garbage_collection_plastic - - type: custom:mushroom-entity-card - entity: sensor.garbage_collection_glass_and_metal - square: false - columns: 2 - # Energy Consumption - - type: custom:mini-graph-card - name: Consumo elettrico giornaliero - icon: mdi:pulse - smoothing: true - hours_to_show: 240 - points_per_hour: 1 - line_width: 2 - line_color: orange - animate: true - height: 100 - entities: - - sensor.daily_energy - show: - graph: bar - average: true - extrema: true - labels: false - group_by: date - aggregate_func: max - # Services - - type: custom:decluttering-card - template: services_card - # Echo Show - - type: media-control - entity: media_player.echo_show_cucina diff --git a/lovelace/005_entrance_view.yaml b/lovelace/005_entrance_view.yaml deleted file mode 100644 index 9b81d99d..00000000 --- a/lovelace/005_entrance_view.yaml +++ /dev/null @@ -1,25 +0,0 @@ -path: entrance -icon: mdi:door -badges: [] -cards: - - type: grid - cards: - - type: custom:slider-button-card - entity: light.vetrina_ingresso - slider: - direction: left-right - background: solid - toggle_on_click: true - icon: - icon: mdi:file-cabinet - tap_action: - action: more-info - use_state_color: false - action_button: - mode: custom - show: false - tap_action: - action: toggle - name: Vetrina - square: false - columns: 2 diff --git a/lovelace/099_services_view.yaml b/lovelace/099_services_view.yaml deleted file mode 100644 index 881eab47..00000000 --- a/lovelace/099_services_view.yaml +++ /dev/null @@ -1,234 +0,0 @@ -path: services -icon: mdi:server-network -badges: [] -cards: - # Internet speed - - cards: - - type: custom:slider-button-card - entity: switch.dummy_switch - show_state: false - slider: - direction: left-right - toggle_on_click: false - icon: - icon: mdi:router-wireless - tap_action: - action: more-info - show: true - use_state_color: false - action_button: - mode: custom - show: true - icon: mdi:open-in-new - tap_action: - action: url - url_path: !secret modem.url - name: Modem - compact: true - - cards: - - type: custom:mini-graph-card - name: Download - line_width: 8 - font_size: 75 - icon: mdi:download - line_color: green - animate: true - entities: - - sensor.speedtest_download - - type: custom:mini-graph-card - name: Upload - entities: - - sensor.speedtest_upload - icon: mdi:upload - line_color: orange - line_width: 8 - font_size: 75 - animate: true - type: horizontal-stack - type: vertical-stack - # Proxmox - - cards: - - type: custom:slider-button-card - entity: switch.dummy_switch - show_state: false - slider: - direction: left-right - toggle_on_click: false - icon: - icon: mdi:server-network - tap_action: - action: more-info - show: true - use_state_color: false - action_button: - mode: custom - show: true - icon: mdi:open-in-new - tap_action: - action: url - url_path: !secret proxmox.url - name: Proxmox - compact: true - - cards: - - type: gauge - entity: sensor.proxmox_cpu_usage - unit: "%" - name: CPU Usage - min: 0 - max: 100 - severity: - green: 0 - yellow: 45 - red: 85 - - type: gauge - entity: sensor.proxmox_memory_usage - unit: "GB" - name: RAM Usage - min: 0 - max: 15.52 - severity: - green: 0 - yellow: 10 - red: 13.5 - type: horizontal-stack - - type: entities - entities: - - entity: sensor.proxmox_cpu_usage - name: CPU Usage - icon: mdi:memory - - entity: sensor.proxmox_memory_usage - name: RAM Usage - icon: mdi:chip - type: vertical-stack - # AdGuard Home - - cards: - - type: custom:slider-button-card - entity: switch.adguard_protection - slider: - direction: left-right - background: solid - toggle_on_click: true - icon: - icon: mdi:shield-check - tap_action: - action: more-info - show: true - use_state_color: false - action_button: - mode: custom - show: true - icon: mdi:open-in-new - tap_action: - action: url - url_path: !secret adguard.url - name: AdGuard Home - compact: true - - cards: - - type: custom:mini-graph-card - name: Requests - entities: - - sensor.adguard_dns_queries - line_width: 8 - font_size: 75 - animate: true - - type: custom:mini-graph-card - name: Blocked - line_width: 8 - font_size: 75 - animate: true - line_color: "#e74c3c" - entities: - - sensor.adguard_dns_queries_blocked_ratio - type: horizontal-stack - - type: entities - entities: - - entity: sensor.adguard_average_processing_speed - name: Average Processing Speed - - entity: sensor.adguard_parental_control_blocked - name: Parental Control Blocked - - entity: sensor.adguard_safe_browsing_blocked - name: Safe Browsing Blocked - - entity: sensor.adguard_safe_searches_enforced - name: Safe Searches Enforced - - type: divider - - entity: switch.adguard_filtering - name: Filtering - icon: mdi:filter-check - - entity: switch.adguard_protection - name: Protection - - entity: switch.adguard_parental_control - name: Parental Control - icon: mdi:human-male-girl - - entity: switch.adguard_safe_browsing - name: Safe Browsing - icon: mdi:shield-half-full - - entity: switch.adguard_safe_search - name: Safe Search - icon: mdi:shield-search - type: vertical-stack - # Transmission - - cards: - - type: custom:slider-button-card - entity: switch.transmission_switch - slider: - direction: left-right - background: solid - toggle_on_click: true - icon: - icon: mdi:light-switch - tap_action: - action: more-info - show: true - use_state_color: false - action_button: - mode: custom - show: true - icon: mdi:open-in-new - tap_action: - action: url - url_path: !secret transmission.url - name: Transmission - compact: true - - cards: - - type: custom:mini-graph-card - icon: mdi:progress-download - name: Download - entities: - - sensor.transmission_down_speed - line_width: 8 - font_size: 75 - animate: true - line_color: green - - type: custom:mini-graph-card - icon: mdi:progress-upload - name: Upload - line_width: 8 - font_size: 75 - animate: true - line_color: orange - entities: - - sensor.transmission_up_speed - type: horizontal-stack - - type: entities - entities: - - entity: sensor.transmission_active_torrents - name: Active - icon: mdi:download - - entity: sensor.transmission_completed_torrents - name: Completed - icon: mdi:check - - entity: sensor.transmission_paused_torrents - name: Paused - icon: mdi:pause - - entity: sensor.transmission_started_torrents - name: Started - icon: mdi:play - - type: divider - - entity: switch.transmission_switch - name: Transmission - icon: mdi:light-switch - - entity: switch.transmission_turtle_mode - name: Turtle Mode - icon: mdi:tortoise - state_color: false - type: vertical-stack diff --git a/lovelace/999_test_view.yaml b/lovelace/999_test_view.yaml deleted file mode 100644 index ce56f4d1..00000000 --- a/lovelace/999_test_view.yaml +++ /dev/null @@ -1,4 +0,0 @@ -path: test -icon: mdi:test-tube -badges: [] -cards: [] diff --git a/templates/README.j2 b/templates/README.j2 new file mode 100644 index 00000000..6b1e510f --- /dev/null +++ b/templates/README.j2 @@ -0,0 +1,86 @@ +# Home Assistant Configuration +[![LICENSE](https://img.shields.io/badge/license-MIT-gold.svg)](LICENSE) + +Here's my personal [Home Assistant](https://home-assistant.io/) configuration. + +I have installed HA on a [Fujitsu Esprimo Q920](https://www.amazon.it/gp/product/B0854LM164) with 16GB RAM (2x [Patriot PSD38G1600L2S](https://www.amazon.it/gp/product/B009WIW9GE)) and 1TB SSD as a [VM](https://community.home-assistant.io/t/home-assistant-os-installation-on-proxmox-ve-7-tutorial/335964) on top of [Proxmox VE](https://www.proxmox.com/en/proxmox-ve). + +I regularly update my configuration files. You can check my current Home Assistant version [here](.HA_VERSION). + + +## Some statistics about my installation: + +Description | value +-- | -- +Number of entities | {{states | count}} +Number of sensors | {{states.sensor | count}} + + +## My installed extensions: + +### Add-ons +{%- for addon in addons | sort(attribute='name') %} +- {{addon.name}} +{%- endfor %} + +### Custom integrations +{%- for component in hacs_components | selectattr('category', 'equalto', 'integration') | sort(attribute='name') %} +- [{{component.name}}]({{component.documentation}}) +{%- endfor %} + +### Lovelace plugins +{%- for component in hacs_components | selectattr('category', 'equalto', 'plugin') | sort(attribute='name') %} +- [{{component.name}}]({{component.documentation}}) +{%- endfor %} + +### Themes +{%- for component in hacs_components | selectattr('category', 'equalto', 'theme') | sort(attribute='name') %} +- [{{component.name}}]({{component.documentation}}) +{%- endfor %} + + +## Lovelace +**NOTE:** I moved my entire configuration to Lovelace UI editor, [ui-lovelace.yaml](ui-lovelace.yaml) is auto-generated. + +### Mobile +![Home](docs/images/home.jpg) +![Livingroom](docs/images/livingroom.jpg) +![Bedroom](docs/images/bedroom.jpg) +![Kitchen](docs/images/kitchen.jpg) +![Home Lab](docs/images/home_lab.jpg) +![Entrance](docs/images/entrance.jpg) +![Bathroom](docs/images/bathroom.jpg) + + +## Other things that I run on my Home Server +- [AdGuard Home](https://adguard.com/en/adguard-home/overview.html) LXC +- [Transmission](https://transmissionbt.com/) LXC +- [Docker](https://www.docker.com/) LXC + - [InfluxDB](https://www.influxdata.com/) Docker container + - [Grafana](https://grafana.com/) Docker container + - [Prometheus](https://prometheus.io/) Docker container + - [cAdvisor](https://github.com/google/cadvisor) Docker container + - [Dashy](https://dashy.to/) Docker container + - [NginxProxyManager](https://nginxproxymanager.com/) Docker container + - [Portainer](https://portainer.io/) Docker container + - [UptimeKuma](https://github.com/louislam/uptime-kuma) Docker container + - [WireGuard](https://www.wireguard.com/) Docker container + - [Broadlink Manager](https://github.com/t0mer/broadlinkmanager-docker) Docker container + +## Additional Hardware +- 1x [KYYKA CC2531](https://www.amazon.it/gp/product/B08Q7NPSRX) with Zigbee2MQTT Firmware +- 1x [SABRENT BT-UB40](https://www.amazon.it/dp/B06XHY5VXF) +- 1x [SwitchBot Hub Mini](https://www.switch-bot.com/products/switchbot-hub-mini) for IR remote control +- 1x [SwitchBot Bot](https://www.switch-bot.com/pages/switchbot-bot) +- 1x [Fire TV 4k Max](https://www.amazon.it/dp/B08MT4MY9J) +- 1x Echo (4th gen) +- 1x Echo Show 5 (2nd gen) +- 1x Echo Dot (3rd gen) +- 1x Broadlink RM4 Pro +- 1x Broadlink RM3 Mini + +> smart bulbs, led strips, temperature and humidity sensors, smart plugs list and missing links incoming... + +*** + +Generated by the [custom readme integration](https://github.com/custom-components/readme) diff --git a/ui-lovelace.yaml b/ui-lovelace.yaml new file mode 100644 index 00000000..b5a537b0 --- /dev/null +++ b/ui-lovelace.yaml @@ -0,0 +1,1061 @@ +decluttering_templates: + services_card: + card: + cards: + - title: Home lab + type: custom:mushroom-title-card + - chips: + - icon: mdi:arrow-right + tap_action: + action: navigate + navigation_path: /lovelace/services + type: template + - entity: sensor.proxmox_cpu_usage + icon: mdi:memory + type: entity + - entity: sensor.proxmox_memory_usage + icon: mdi:chip + type: entity + - entity: sensor.speedtest_download + icon: mdi:download + type: entity + type: custom:mushroom-chips-card + - cards: + - entity: binary_sensor.internet_connection + icon: mdi:router-wireless + name: Internet + tap_action: + action: navigate + navigation_path: /lovelace/services + type: custom:mushroom-entity-card + - entity: binary_sensor.proxmox_is_running + icon: mdi:server-network + name: Proxmox + tap_action: + action: navigate + navigation_path: /lovelace/services + type: custom:mushroom-entity-card + type: horizontal-stack + - cards: + - entity: binary_sensor.adguard_protection + icon: mdi:shield-check + tap_action: + action: navigate + navigation_path: /lovelace/services + type: custom:mushroom-entity-card + - entity: binary_sensor.transmission_switch + icon: mdi:light-switch + tap_action: + action: navigate + navigation_path: /lovelace/services + type: custom:mushroom-entity-card + type: horizontal-stack + - cards: + - entity: switch.dummy_switch + icon: mdi:monitor-dashboard + icon_color: green + primary: Dashy + tap_action: + action: url + url_path: service.com + type: custom:mushroom-template-card + type: horizontal-stack + type: vertical-stack +title: Casa +views: +- badges: + - entity: person.aronne + name: '' + - entity: person.valentina + name: '' + - entity: sensor.home_temperature + name: '' + - entity: sensor.home_humidity + name: '' + - entity: sensor.frient_energy_monitor_power + name: '' + - entity: sensor.daily_energy + name: '' + cards: + - entity: weather.casa + name: Casa + show_current: true + show_forecast: true + type: weather-forecast + - cards: + - title: 🛋️ Sala + title_tap_action: + action: navigate + navigation_path: /lovelace/livingroom + type: custom:mushroom-title-card + - chips: + - entity: sensor.termometro_sala_temperature + icon: '' + type: entity + - entity: sensor.termometro_sala_humidity + icon: '' + type: entity + - entity: media_player.echo_sala + icon: '' + type: entity + type: custom:mushroom-chips-card + - cards: + - entity: light.livingroom + name: Luce + type: custom:mushroom-light-card + - entity: climate.condizionatore_sala + icon: mdi:air-conditioner + name: Condizionatore + type: custom:mushroom-climate-card + type: horizontal-stack + type: vertical-stack + - cards: + - title: 🛌 Camera + title_tap_action: + action: navigate + navigation_path: /lovelace/bedroom + type: custom:mushroom-title-card + - chips: + - entity: sensor.termometro_camera_temperature + icon: '' + type: entity + - entity: sensor.termometro_camera_humidity + icon: '' + type: entity + - entity: media_player.echo_dot_camera + icon: '' + type: entity + type: custom:mushroom-chips-card + - cards: + - entity: light.bed + name: Luce + type: custom:mushroom-light-card + - entity: climate.condizionatore_camera + icon: mdi:air-conditioner + name: Condizionatore + type: custom:mushroom-climate-card + type: horizontal-stack + type: vertical-stack + - cards: + - title: 🍳 Cucina + title_tap_action: + action: navigate + navigation_path: /lovelace/kitchen + type: custom:mushroom-title-card + - chips: + - entity: media_player.echo_show_cucina + icon: '' + type: entity + - content_info: name + entity: binary_sensor.garbage_collection_tomorrow + icon: mdi:trash-can-outline + icon_color: red + name: Raccolta rifiuti domani + type: entity + use_entity_picture: false + type: custom:mushroom-chips-card + - cards: + - entity: climate.condizionatore_cucina + icon: mdi:air-conditioner + name: Condizionatore + type: custom:mushroom-climate-card + type: horizontal-stack + type: vertical-stack + - cards: + - title: 🚽 Bagno + title_tap_action: + action: navigate + navigation_path: /lovelace/bathroom + type: custom:mushroom-title-card + - chips: [] + type: custom:mushroom-chips-card + - cards: + - entity: switch.water_heater + icon: mdi:water-boiler + icon_color: cyan + tap_action: + action: toggle + type: custom:mushroom-entity-card + type: horizontal-stack + type: vertical-stack + - cards: + - title: 🚪 Ingresso + title_tap_action: + action: navigate + navigation_path: /lovelace/entrance + type: custom:mushroom-title-card + - chips: [] + type: custom:mushroom-chips-card + - cards: + - entity: light.entrance + name: Luce + type: custom:mushroom-light-card + type: horizontal-stack + type: vertical-stack + - cards: + - title: 🧪 Lab + title_tap_action: + action: navigate + navigation_path: /lovelace/services + type: custom:mushroom-title-card + - chips: + - entity: sensor.proxmox_cpu_usage + icon: mdi:memory + type: entity + - entity: sensor.proxmox_memory_usage + icon: mdi:chip + type: entity + - entity: sensor.speedtest_download + icon: mdi:download + type: entity + type: custom:mushroom-chips-card + - cards: + - entity: binary_sensor.internet_connection + icon: mdi:router-wireless + icon_color: red + name: Internet + tap_action: + action: navigate + navigation_path: /lovelace/services + type: custom:mushroom-entity-card + - entity: binary_sensor.proxmox_is_running + icon: mdi:server-network + icon_color: indigo + name: Proxmox + tap_action: + action: navigate + navigation_path: /lovelace/services + type: custom:mushroom-entity-card + type: horizontal-stack + - cards: + - entity: binary_sensor.adguard_protection + icon: mdi:shield-check + icon_color: green + tap_action: + action: navigate + navigation_path: /lovelace/services + type: custom:mushroom-entity-card + - entity: binary_sensor.transmission_switch + icon: mdi:light-switch + icon_color: amber + tap_action: + action: navigate + navigation_path: /lovelace/services + type: custom:mushroom-entity-card + type: horizontal-stack + - cards: + - entity: switch.dummy_switch + icon: mdi:monitor-dashboard + icon_color: teal + primary: Dashy + tap_action: + action: url + url_path: http://192.168.1.13:8080/ + type: custom:mushroom-template-card + type: horizontal-stack + type: vertical-stack + - cards: + - title: Media player + type: custom:mushroom-title-card + - collapsible_controls: false + entity: media_player.spotify_aronne_brivio + fill_container: false + layout: vertical + media_controls: + - previous + - play_pause_stop + - next + name: Spotify + show_volume_level: true + type: custom:mushroom-media-player-card + use_media_artwork: true + use_media_info: true + type: vertical-stack + icon: mdi:home-assistant + path: default_view +- badges: [] + cards: + - cards: + - title: Smart home + type: custom:mushroom-title-card + - cards: + - collapsible_controls: true + entity: media_player.tv + show_volume_level: true + tap_action: + action: toggle + type: custom:mushroom-media-player-card + use_media_info: true + volume_controls: + - volume_set + - volume_buttons + - entity: light.spada_suprema + icon: mdi:sword + name: Spada Suprema + primary_info: name + secondary_info: state + tap_action: + action: toggle + type: custom:mushroom-light-card + type: horizontal-stack + - collapsible_controls: true + entity: light.piantana_sala + icon: mdi:floor-lamp-torchiere + name: Piantana + primary_info: name + secondary_info: state + show_brightness_control: true + show_color_temp_control: true + type: custom:mushroom-light-card + use_light_color: true + - collapsible_controls: true + entity: climate.condizionatore_sala + hvac_modes: + - heat + - cool + icon: mdi:air-conditioner + name: Condizionatore + show_temperature_control: true + type: custom:mushroom-climate-card + type: vertical-stack + - cards: + - title: Sensori + type: custom:mushroom-title-card + - animate: true + color_thresholds: + - color: '#f39c12' + value: 20 + - color: '#d35400' + value: 21 + - color: '#c0392b' + value: 21.5 + entities: + - entity: sensor.termometro_sala_temperature + show_legend: false + - color: gray + entity: sun.sun + name: Night + show_legend: false + show_line: false + show_points: false + y_axis: secondary + hours_to_show: 168 + name: Temperatura + points_per_hour: 0.25 + show: + labels: true + labels_secondary: true + state_map: + - label: Night + value: below_horizon + - label: Day + value: above_horizon + type: custom:mini-graph-card + - animate: true + entities: + - color: '#89cff0' + entity: sensor.termometro_sala_humidity + show_legend: false + - color: gray + entity: sun.sun + name: Night + show_legend: false + show_line: false + show_points: false + y_axis: secondary + hours_to_show: 168 + name: Umidità + points_per_hour: 0.25 + show: + labels: true + labels_secondary: true + state_map: + - label: Night + value: below_horizon + - label: Day + value: above_horizon + type: custom:mini-graph-card + type: vertical-stack + - cards: + - title: Media player + type: custom:mushroom-title-card + - collapsible_controls: false + entity: media_player.firestick + icon: mdi:television + layout: vertical + media_controls: [] + name: Firestick + show_volume_level: true + type: custom:mushroom-media-player-card + use_media_artwork: true + use_media_info: true + volume_controls: [] + - entity: media_player.echo_sala + icon: mdi:speaker-wireless + layout: vertical + media_controls: + - previous + - play_pause_stop + - next + show_volume_level: true + type: custom:mushroom-media-player-card + use_media_artwork: true + use_media_info: true + volume_controls: + - volume_mute + - volume_set + - volume_buttons + type: vertical-stack + - cards: + - title: Extra + type: custom:mushroom-title-card + - cards: + - collapsible_controls: true + entity: light.piantana_sala_luce_grande + icon: mdi:floor-lamp-torchiere + name: Grande + primary_info: name + secondary_info: state + show_brightness_control: true + type: custom:mushroom-light-card + use_light_color: false + - collapsible_controls: true + entity: light.piantana_sala_luce_piccola + icon: mdi:floor-lamp + name: Piccola + primary_info: name + secondary_info: state + show_brightness_control: true + type: custom:mushroom-light-card + use_light_color: false + type: horizontal-stack + type: vertical-stack + icon: mdi:sofa + path: livingroom +- badges: [] + cards: + - cards: + - title: Smart home + type: custom:mushroom-title-card + - cards: + - collapsible_controls: true + entity: light.abat_jour_letto_sinistra + icon: mdi:floor-lamp + name: Letto Nennè + primary_info: name + secondary_info: state + show_brightness_control: true + show_color_control: true + tap_action: + action: toggle + type: custom:mushroom-light-card + use_light_color: true + type: horizontal-stack + - collapsible_controls: true + entity: climate.condizionatore_camera + icon: mdi:air-conditioner + name: Condizionatore + show_temperature_control: true + tap_action: + action: toggle + type: custom:mushroom-climate-card + - cards: + - entity: switch.work_station + icon: mdi:account-hard-hat + name: Work Station + primary_info: name + secondary_info: state + tap_action: + action: toggle + type: custom:mushroom-entity-card + - entity: switch.gaming_station + icon: mdi:controller + name: Gaming Station + primary_info: name + secondary_info: state + tap_action: + action: toggle + type: custom:mushroom-entity-card + type: horizontal-stack + type: vertical-stack + - cards: + - title: Scrivania + type: custom:mushroom-title-card + - cards: + - collapsible_controls: true + entity: light.luce_scrivania + icon: mdi:led-strip-variant + name: Luce + show_brightness_control: true + tap_action: + action: toggle + type: custom:mushroom-light-card + use_light_color: true + type: horizontal-stack + - cards: + - entity: switch.fisso + icon: mdi:desktop-classic + icon_color: green + name: PC + tap_action: + action: toggle + type: custom:mushroom-entity-card + - entity: switch.casse_pc + icon: mdi:speaker + icon_color: purple + name: Casse + tap_action: + action: toggle + type: custom:mushroom-entity-card + type: horizontal-stack + - cards: + - collapsible_controls: true + entity: light.asus_tuf_gaming_b460_plus_0 + icon: '' + name: Scheda madre + show_brightness_control: true + show_color_control: true + show_color_temp_control: false + tap_action: + action: toggle + type: custom:mushroom-light-card + use_light_color: true + - collapsible_controls: true + entity: light.nzxt_smart_device_v2_2 + fill_container: false + icon: mdi:led-strip-variant + name: Led PC + show_brightness_control: true + show_color_control: true + show_color_temp_control: false + tap_action: + action: toggle + type: custom:mushroom-light-card + use_light_color: true + type: horizontal-stack + - entities: + - entity: sensor.cpu_load + name: CPU Load + - entity: sensor.gpu_load + name: GPU Load + - entity: sensor.ram_usage + name: RAM Usage + show_header_toggle: true + title: PC + type: entities + type: vertical-stack + - cards: + - title: Sensori + type: custom:mushroom-title-card + - animate: true + color_thresholds: + - color: '#f39c12' + value: 20 + - color: '#d35400' + value: 21 + - color: '#c0392b' + value: 21.5 + entities: + - entity: sensor.termometro_camera_temperature + show_legend: false + - color: gray + entity: sun.sun + name: Night + show_legend: false + show_line: false + show_points: false + y_axis: secondary + hours_to_show: 168 + name: Temperatura + points_per_hour: 0.25 + show: + labels: true + labels_secondary: true + state_map: + - label: Night + value: below_horizon + - label: Day + value: above_horizon + type: custom:mini-graph-card + - animate: true + entities: + - color: '#89cff0' + entity: sensor.termometro_camera_humidity + show_legend: false + - color: gray + entity: sun.sun + name: Night + show_legend: false + show_line: false + show_points: false + y_axis: secondary + hours_to_show: 168 + name: Umidità + points_per_hour: 0.25 + show: + labels: true + labels_secondary: true + state_map: + - label: Night + value: below_horizon + - label: Day + value: above_horizon + type: custom:mini-graph-card + type: vertical-stack + - cards: + - title: Media player + type: custom:mushroom-title-card + - collapsible_controls: true + entity: media_player.echo_dot_camera + fill_container: false + icon: mdi:speaker-wireless + layout: vertical + media_controls: + - play_pause_stop + - previous + - next + show_volume_level: true + type: custom:mushroom-media-player-card + use_media_artwork: true + use_media_info: true + volume_controls: + - volume_mute + - volume_set + - volume_buttons + type: vertical-stack + icon: mdi:bed-king + path: bedroom +- badges: [] + cards: + - cards: + - title: Raccolta rifiuti + type: custom:mushroom-title-card + - cards: + - entity: sensor.garbage_collection_trash + icon_color: brown + type: custom:mushroom-entity-card + - entity: sensor.garbage_collection_organic + icon_color: green + type: custom:mushroom-entity-card + - entity: sensor.garbage_collection_paper + icon_color: disabled + type: custom:mushroom-entity-card + - entity: sensor.garbage_collection_plastic + icon_color: orange + type: custom:mushroom-entity-card + - entity: sensor.garbage_collection_glass_and_metal + icon_color: cyan + type: custom:mushroom-entity-card + columns: 2 + square: false + type: grid + type: vertical-stack + - cards: + - title: Smart home + type: custom:mushroom-title-card + - collapsible_controls: true + entity: climate.condizionatore_cucina + icon: mdi:air-conditioner + name: Condizionatore + show_temperature_control: true + tap_action: + action: toggle + type: custom:mushroom-climate-card + type: vertical-stack + - aggregate_func: max + animate: true + entities: + - sensor.daily_energy + group_by: date + height: 100 + hours_to_show: 240 + icon: mdi:pulse + line_color: orange + line_width: 2 + name: Consumo elettrico giornaliero + points_per_hour: 1 + show: + average: true + extrema: true + graph: bar + labels: false + smoothing: true + type: custom:mini-graph-card + - cards: + - title: Home lab + type: custom:mushroom-title-card + - chips: + - icon: mdi:arrow-right + tap_action: + action: navigate + navigation_path: /lovelace/services + type: template + - entity: sensor.proxmox_cpu_usage + icon: mdi:memory + type: entity + - entity: sensor.proxmox_memory_usage + icon: mdi:chip + type: entity + - entity: sensor.speedtest_download + icon: mdi:download + type: entity + type: custom:mushroom-chips-card + - cards: + - entity: binary_sensor.internet_connection + icon: mdi:router-wireless + icon_color: red + name: Internet + tap_action: + action: navigate + navigation_path: /lovelace/services + type: custom:mushroom-entity-card + - entity: binary_sensor.proxmox_is_running + icon: mdi:server-network + icon_color: indigo + name: Proxmox + tap_action: + action: navigate + navigation_path: /lovelace/services + type: custom:mushroom-entity-card + type: horizontal-stack + - cards: + - entity: binary_sensor.adguard_protection + icon: mdi:shield-check + icon_color: green + tap_action: + action: navigate + navigation_path: /lovelace/services + type: custom:mushroom-entity-card + - entity: binary_sensor.transmission_switch + icon: mdi:light-switch + icon_color: amber + tap_action: + action: navigate + navigation_path: /lovelace/services + type: custom:mushroom-entity-card + type: horizontal-stack + - cards: + - entity: switch.dummy_switch + icon: mdi:monitor-dashboard + icon_color: teal + primary: Dashy + tap_action: + action: url + url_path: http://192.168.1.13:8080/ + type: custom:mushroom-template-card + type: horizontal-stack + type: vertical-stack + - cards: + - title: Media player + type: custom:mushroom-title-card + - collapsible_controls: true + entity: media_player.echo_show_cucina + fill_container: false + layout: vertical + media_controls: + - previous + - play_pause_stop + - next + show_volume_level: true + type: custom:mushroom-media-player-card + use_media_artwork: true + use_media_info: true + volume_controls: + - volume_mute + - volume_set + - volume_buttons + type: vertical-stack + icon: mdi:chef-hat + path: kitchen +- badges: [] + cards: + - cards: + - title: Smart home + type: custom:mushroom-title-card + - entity: switch.water_heater + icon: mdi:water-boiler + icon_color: cyan + tap_action: + action: toggle + type: custom:mushroom-entity-card + type: vertical-stack + icon: mdi:toilet + path: bathroom + theme: Backend-selected +- badges: [] + cards: + - cards: + - title: Smart home + type: custom:mushroom-title-card + - entity: light.vetrina_ingresso + icon: mdi:file-cabinet + tap_action: + action: toggle + type: custom:mushroom-entity-card + type: vertical-stack + icon: mdi:door + path: entrance +- badges: [] + cards: + - cards: + - title: Modem + type: custom:mushroom-title-card + - chips: + - icon: mdi:open-in-new + tap_action: + action: url + url_path: http://192.168.1.1 + type: template + - entity: sensor.speedtest_download + icon: mdi:download + type: entity + - entity: sensor.speedtest_upload + icon: mdi:upload + type: entity + - entity: sensor.speedtest_ping + type: entity + type: custom:mushroom-chips-card + - cards: + - animate: true + entities: + - sensor.speedtest_download + font_size: 75 + icon: mdi:download + line_color: green + line_width: 8 + name: Download + type: custom:mini-graph-card + - animate: true + entities: + - sensor.speedtest_upload + font_size: 75 + icon: mdi:upload + line_color: orange + line_width: 8 + name: Upload + type: custom:mini-graph-card + type: horizontal-stack + type: vertical-stack + - cards: + - title: Proxmox + type: custom:mushroom-title-card + - chips: + - icon: mdi:open-in-new + tap_action: + action: url + url_path: https://192.168.1.2:8006/ + type: template + - entity: sensor.proxmox_cpu_usage + icon: mdi:memory + type: entity + - entity: sensor.proxmox_memory_usage + icon: mdi:chip + type: entity + type: custom:mushroom-chips-card + - cards: + - entity: sensor.proxmox_cpu_usage + max: 100 + min: 0 + name: CPU Usage + severity: + green: 0 + red: 85 + yellow: 45 + type: gauge + unit: '%' + - entity: sensor.proxmox_memory_usage + max: 16 + min: 0 + name: RAM Usage + severity: + green: 0 + red: 13 + yellow: 10 + type: gauge + unit: GB + type: horizontal-stack + - entity: sensor.proxmox_storage_usage + max: 100 + min: 0 + name: Disk Usage + needle: false + severity: + green: 0 + red: 80 + yellow: 50 + type: gauge + unit: '%' + type: vertical-stack + - cards: + - title: AdGuard Home + type: custom:mushroom-title-card + - chips: + - icon: mdi:open-in-new + tap_action: + action: url + url_path: http://192.168.1.5:3000/ + type: template + - entity: sensor.adguard_average_processing_speed + type: entity + - entity: sensor.adguard_parental_control_blocked + type: entity + - entity: sensor.adguard_safe_browsing_blocked + type: entity + - entity: sensor.adguard_safe_searches_enforced + type: entity + type: custom:mushroom-chips-card + - cards: + - animate: true + entities: + - sensor.adguard_dns_queries + font_size: 75 + line_width: 8 + name: Requests + type: custom:mini-graph-card + - animate: true + entities: + - sensor.adguard_dns_queries_blocked_ratio + font_size: 75 + line_color: '#e74c3c' + line_width: 8 + name: Blocked + type: custom:mini-graph-card + type: horizontal-stack + - entities: + - entity: switch.adguard_filtering + icon: mdi:filter-check + name: Filtering + - entity: switch.adguard_protection + name: Protection + - entity: switch.adguard_parental_control + icon: mdi:human-male-girl + name: Parental Control + - entity: switch.adguard_safe_browsing + icon: mdi:shield-half-full + name: Safe Browsing + - entity: switch.adguard_safe_search + icon: mdi:shield-search + name: Safe Search + type: entities + type: vertical-stack + - cards: + - title: Transmission + type: custom:mushroom-title-card + - chips: + - icon: mdi:open-in-new + tap_action: + action: url + url_path: http://192.168.1.6:9091/ + type: template + - entity: sensor.transmission_completed_torrents + icon: mdi:check + type: entity + - entity: sensor.transmission_paused_torrents + icon: mdi:pause + type: entity + - entity: sensor.transmission_started_torrents + icon: mdi:play + type: entity + type: custom:mushroom-chips-card + - cards: + - animate: true + entities: + - sensor.transmission_down_speed + font_size: 75 + icon: mdi:progress-download + line_color: green + line_width: 8 + name: Download + type: custom:mini-graph-card + - animate: true + entities: + - sensor.transmission_up_speed + font_size: 75 + icon: mdi:progress-upload + line_color: orange + line_width: 8 + name: Upload + type: custom:mini-graph-card + type: horizontal-stack + - entities: + - entity: switch.transmission_switch + icon: mdi:light-switch + name: Transmission + - entity: switch.transmission_turtle_mode + icon: mdi:tortoise + name: Turtle Mode + type: entities + type: vertical-stack + icon: mdi:server-network + path: services +- badges: [] + cards: + - cards: + - title: Scrivania + type: custom:mushroom-title-card + - cards: + - collapsible_controls: true + entity: light.luce_scrivania + icon: mdi:led-strip-variant + name: Luce + show_brightness_control: true + tap_action: + action: toggle + type: custom:mushroom-light-card + use_light_color: true + type: horizontal-stack + - cards: + - entity: switch.fisso + icon: mdi:desktop-classic + icon_color: green + name: PC + tap_action: + action: toggle + type: custom:mushroom-entity-card + - entity: switch.casse_pc + icon: mdi:speaker + icon_color: purple + name: Casse + tap_action: + action: toggle + type: custom:mushroom-entity-card + type: horizontal-stack + - cards: + - collapsible_controls: true + entity: light.asus_tuf_gaming_b460_plus_0 + icon: '' + name: Scheda madre + show_brightness_control: true + show_color_control: true + show_color_temp_control: false + tap_action: + action: toggle + type: custom:mushroom-light-card + use_light_color: true + - collapsible_controls: true + entity: light.nzxt_smart_device_v2_2 + fill_container: false + icon: mdi:led-strip-variant + name: Led PC + show_brightness_control: true + show_color_control: true + show_color_temp_control: false + tap_action: + action: toggle + type: custom:mushroom-light-card + use_light_color: true + type: horizontal-stack + - entities: + - entity: sensor.cpu_load + name: CPU Load + - entity: sensor.gpu_load + name: GPU Load + - entity: sensor.ram_usage + name: RAM Usage + show_header_toggle: true + title: PC + type: entities + type: vertical-stack + icon: mdi:desktop-classic + path: pc + theme: Backend-selected