Skip to content

Commit

Permalink
Make vacuum work again
Browse files Browse the repository at this point in the history
  • Loading branch information
macbury committed Aug 7, 2021
1 parent 8a761a7 commit eedd48a
Show file tree
Hide file tree
Showing 57 changed files with 3,143 additions and 379 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version: '3.5'
services:
home-assistant:
image: homeassistant/home-assistant:2021.8.0
image: homeassistant/home-assistant:2021.8.3
extra_hosts:
- "outside:${HOME_ASSISTANT_IP}"
env_file:
Expand Down
59 changes: 32 additions & 27 deletions home-assistant/components/camera.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
- platform: generic
- platform: xiaomi_cloud_map_extractor
name: Vacuum Map
still_image_url: http://localhost:10005/map.png
framerate: 1

- platform: generic
name: Vacuum Grid Map
still_image_url: http://localhost:10005/map.grid.png
framerate: 1

- platform: ffmpeg
input: https://hoktastream1.webcamera.pl/wentzl_cam_be5c6c/wentzl_cam_be5c6c.stream/playlist.m3u8
name: Main Square

- platform: ffmpeg
input: https://hoktastream2.webcamera.pl/krakow_cam_4c3e37/krakow_cam_4c3e37.stream/chunks.m3u8
name: Wawel

- platform: mjpeg
mjpeg_url: !env_var HOME_ASSISTANT_HIM_CAM_URL
username: pi
password: !env_var HOME_ASSISTANT_HIM_CAM_PASSWORD
name: him_cam


- platform: mjpeg
mjpeg_url: http://192.168.1.237:2971/camera/stream
name: Nexus 7
host: 192.168.1.222
country: "de"
token: !env_var HOME_ASSISTANT_VACUUM_TOKEN
username: !env_var HOME_ASSISTANT_XIAOMI_USERNAME
password: !env_var HOME_ASSISTANT_XIAOMI_PASSWORD
draw: ['all']
attributes:
- calibration_points
- charger
- cleaned_rooms
- country
- goto
- goto_path
- goto_predicted_path
- image
- is_empty
- map_name
- no_go_areas
- no_mopping_areas
- obstacles
- ignored_obstacles
- obstacles_with_photo
- ignored_obstacles_with_photo
- path
- room_numbers
- rooms
- vacuum_position
- vacuum_room
- vacuum_room_name
- walls
- zones
4 changes: 0 additions & 4 deletions home-assistant/components/vacuum.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
- platform: xiaomi_miio
host: 192.168.1.222
name: main_vacuum
token: !env_var HOME_ASSISTANT_VACUUM_TOKEN
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"error": {
"2fa_key_invalid": "Clé 2FA intégrée non valide",
"connection_error": "Erreur de connexion; vérifier le réseau et réessayer",
"hass_url_invalid": "Impossible de se connecter à l'URL de Home Assistant. Veuillez vérifier l'URL interne sous Configuration - > Général",
"hass_url_invalid": "Impossible de se connecter à l'URL de Home Assistant. Veuillez vérifier l'URL externe sous Configuration - > Général",
"identifier_exists": "Email pour l'URL Alexa déjà enregistré",
"invalid_credentials": "Informations d'identification invalides",
"unknown_error": "Erreur inconnue, veuillez signaler les informations du journal"
Expand Down
10 changes: 4 additions & 6 deletions home-assistant/custom_components/alexa_media/alexa_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
For more details about this platform, please refer to the documentation at
https://community.home-assistant.io/t/echo-devices-alexa-as-media-player-testers-needed/58639
"""
from datetime import datetime, timezone
from datetime import datetime
import json
import logging
import re
Expand Down Expand Up @@ -264,9 +264,7 @@ def parse_color_from_coordinator(
if value is not None:
hue = value.get("hue", 0)
saturation = value.get("saturation", 0)
brightness = parse_brightness_from_coordinator(coordinator, entity_id, since)
if brightness is not None:
return hue, saturation, brightness / 100
return hue, saturation, 1
return None


Expand Down Expand Up @@ -324,8 +322,8 @@ def is_cap_state_still_acceptable(
if formatted_time_of_sample:
try:
time_of_sample = datetime.strptime(
formatted_time_of_sample, "%Y-%m-%dT%H:%M:%S.%fZ"
).replace(tzinfo=timezone.utc)
formatted_time_of_sample, "%Y-%m-%dT%H:%M:%S.%f%z"
)
return time_of_sample >= since
except ValueError:
pass
Expand Down
2 changes: 1 addition & 1 deletion home-assistant/custom_components/alexa_media/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"""
from datetime import timedelta

__version__ = "3.10.7"
__version__ = "3.10.8"
PROJECT_URL = "https://github.com/custom-components/alexa_media_player/"
ISSUE_URL = f"{PROJECT_URL}issues"

Expand Down
Loading

0 comments on commit eedd48a

Please sign in to comment.