# Problem z Shelly Dimmer 2

**URL:** <https://ai-speaker.discourse.group/t/problem-z-shelly-dimmer-2/1036>\
**Category:** Uncategorized\
**Created:** [30 Listopad 2020 20:18 UTC](https://ai-speaker.discourse.group/t/problem-z-shelly-dimmer-2/1036 "2020-11-30T20:18:42Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Autor:** ![jszkiela](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@jszkiela](https://ai-speaker.discourse.group/u/jszkiela)\
**Data wpisu:** [30 Listopad 2020 20:18 UTC](https://ai-speaker.discourse.group/t/problem-z-shelly-dimmer-2/1036/1 "2020-11-30T20:18:42Z")

</div>

Witam

W dniu dzisiejszym dotarł do mnie moduł Shelly Dimmer 2. Wgrałem do niego Tasmotę z [http://ota.tasmota.com/tasmota/](http://ota.tasmota.com/tasmota/)  
szablon z [https://templates.blakadder.com/shelly\_Dimmer\_2.html](https://templates.blakadder.com/shelly_Dimmer_2.html)  
skonfigurowałem Wifi i MQTT i moduł bez problemu pojawił się w AIS.  
Mimo tego że wszystko wygląda ok. moduł nie steruje żarówką ani z AIS jak i ze strony modułu. Czy ktoś z was używa takiego modułu i może potwierdzić że działa mu prawidłowo? Czy trzeba coś jeszcze konfigurować dla tego modułu? Kończą mi się pomysły.

 ![Shelly Dimmer 1](https://global.discourse-cdn.com/free1/uploads/ai_speaker/original/2X/a/a4aaaad21fc3d76521a727f1a9d4ca4b723f4353.jpeg)  
 ![Shelly Dimmer 2](https://global.discourse-cdn.com/free1/uploads/ai_speaker/original/2X/4/46c33c805654efc034da38718f8157a2f3deef64.jpeg)

---

<div class="post-metadata">

**Autor:** ![Stravi](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Stravi](https://ai-speaker.discourse.group/u/Stravi)\
**Data wpisu:** [30 Listopad 2020 20:34 UTC](https://ai-speaker.discourse.group/t/problem-z-shelly-dimmer-2/1036/2 "2020-11-30T20:34:02Z")

</div>

A tak tylko spytam. Oryginalny soft Shelly po MQTT Ci nie działał?

---

<div class="post-metadata">

**Autor:** ![jszkiela](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@jszkiela](https://ai-speaker.discourse.group/u/jszkiela)\
**Data wpisu:** [30 Listopad 2020 20:58 UTC](https://ai-speaker.discourse.group/t/problem-z-shelly-dimmer-2/1036/3 "2020-11-30T20:58:33Z")

</div>

No właśnie nie sprawdziłem ponieważ od razu zrobiłem flash. Jak niczeg ciekawego nie dowiem się na forum to wgram oryginał mam nadzieje że da radę - kopię robiłem Tasmotizerem. Używasz może tego modułu z oryginalnym softem?

---

<div class="post-metadata">

**Autor:** ![Stravi](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Stravi](https://ai-speaker.discourse.group/u/Stravi)\
**Data wpisu:** [30 Listopad 2020 21:03 UTC](https://ai-speaker.discourse.group/t/problem-z-shelly-dimmer-2/1036/4 "2020-11-30T21:03:02Z")

</div>

Nie, mam tylko 1 sztukę shelly 1, ale to jest jedyne urządzenie, które nie sprawiło mi nawet najdrobniejszego problemu, a jest na oryginalnym sofcie.

---

<div class="post-metadata">

**Autor:** ![Cezary.K](https://avatars.discourse-cdn.com/v4/letter/c/a88e4f/32.png) [@Cezary.K](https://ai-speaker.discourse.group/u/Cezary.K)\
**Data wpisu:** [30 Listopad 2020 21:45 UTC](https://ai-speaker.discourse.group/t/problem-z-shelly-dimmer-2/1036/5 "2020-11-30T21:45:37Z")

</div>

Właśnie czytam starając się Tobie pomóc o tym ściemniaczu. Jest specyficzny, bo ma na pokładzie mikro-kontroler STM32.

> [@jszkiela](#):
>
> Czy trzeba coś jeszcze konfigurować dla tego modułu?

Obstawiam, że chodzi o jakieś ustawienia konfiguracji dla GPIO4 i GPIO5 - _SHD_. Już chyba nie trzeba dodatkowo zmienić oprogramowanie dla STM…  
A może zwyczajnie parę komend do skonfigurowania

> **[Rules - Tasmota](https://tasmota.github.io/docs/Rules/#control-a-dimmer-with-one-switch)**
>
> Documentation (Wiki) for Tasmota

![obraz](https://global.discourse-cdn.com/free1/uploads/ai_speaker/original/2X/f/fb53ecb079aef5d87f3caee4e7400fd03972cac6.png)

Wybacz ale nie mam czasu na kolejną doktoryzację z kolejnego kawałka Tasmota, zwłaszcza jak go nie używam. Lecz sądząc po tym, że używasz Tasmotizera dasz sobie radę.

---

<div class="post-metadata">

**Autor:** ![jszkiela](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@jszkiela](https://ai-speaker.discourse.group/u/jszkiela)\
**Data wpisu:** [2 Grudzień 2020 00:10 UTC](https://ai-speaker.discourse.group/t/problem-z-shelly-dimmer-2/1036/6 "2020-12-02T00:10:12Z")

</div>

Przywróciłem na Shelly Dimer 2 oryginalny firmware. Nie mogłem jednak tego zrobić Tasmotizerem czy ESP Easy. Po wgranie firmwaru moduł nie pokazywał wifi. Uzyskałem pomoc na forum Shelly, gdyby ktoś potrzebował przywrócić oryginalny firmware to trzeba skorzystać z tej strony. [https://github.com/yaourdt/tasmota-to-mgos](https://github.com/yaourdt/tasmota-to-mgos)  
Moduł jest sprawny mogę nim sterować przez jego stronę. Mam do ciebie pytanie jak zintegrować moduł z AIS trzeba instalować integrację Shelly czy wystarczy uzupełnić MQTT na module?

---

<div class="post-metadata">

**Autor:** ![Stravi](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Stravi](https://ai-speaker.discourse.group/u/Stravi)\
**Data wpisu:** [2 Grudzień 2020 08:02 UTC](https://ai-speaker.discourse.group/t/problem-z-shelly-dimmer-2/1036/7 "2020-12-02T08:02:56Z")

</div>

Nie wiem, ale ja bym skonfigurował mqtt z discovery i sprawdził. Jesli nie zadziała to wtedy Integracje shelly, jest ich chyba 5 🙂  
Bienia bym podpytał o en temat jeśli mqtt nie zadziała.

---

<div class="post-metadata">

**Autor:** ![jszkiela](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@jszkiela](https://ai-speaker.discourse.group/u/jszkiela)\
**Data wpisu:** [2 Grudzień 2020 22:20 UTC](https://ai-speaker.discourse.group/t/problem-z-shelly-dimmer-2/1036/8 "2020-12-02T22:20:04Z")

</div>

Męczę się z tym modułem bezskutecznie cały wieczór. Na module ustawiłem:

 ![obraz](https://global.discourse-cdn.com/free1/uploads/ai_speaker/original/2X/c/ce7d5ea5a49805cfb2ec263e04aebcc12ab9cf72.png)

W configuration.yaml dodałem:  
binary\_sensor:  
- platform: mqtt  
name: “Shelly Dimmer Kitchen ext. Switch 1 (MQTT)”  
state\_topic: “shellies/dom\_shellydimmer2-XXXXXX/input/0”  
payload\_on: “1”  
payload\_off: “0”  
availability:  
payload\_available: ‘true’  
payload\_not\_available: ‘false’  
topic: ‘shellies/dom\_shellydimmer2-XXXXXX/online’  
qos: 1

Niestety moduł nie jest widoczny w AIS. Czy to jest dobra konfiguracja?  
Próbowałem też zainstalować integrację która jest w asystencie domowym. ale wywala mi taki komunikat:  
 ![obraz](https://global.discourse-cdn.com/free1/uploads/ai_speaker/original/2X/9/9024df04cda0cd812d40a429ba059788379d0ec6.png)

Czy ta integracja jest odpowiednia do modułów Shelly? Proszę o pomoc kogoś bardziej ogarniętego w tematach integracji.

Podrawiam  
Jarek

---

<div class="post-metadata">

**Autor:** ![Stravi](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Stravi](https://ai-speaker.discourse.group/u/Stravi)\
**Data wpisu:** [3 Grudzień 2020 09:02 UTC](https://ai-speaker.discourse.group/t/problem-z-shelly-dimmer-2/1036/9 "2020-12-03T09:02:15Z")

</div>

Wprowadziłem Ciebie w błąd, Shelly nie ma auto-discovery.  
Integrowałem u siebie tego Shelly już tak dawno, że zapomniałem jak to robiłem. Zrobiłem to ręcznie przez plik lights.yaml.

 ![image](https://global.discourse-cdn.com/free1/uploads/ai_speaker/original/2X/d/dda14d45e8830ab6089c06ae884b0b5a72403e01.png)  
Tutaj już wy-komentowany, ponieważ w ramach przeprosin postanowiłem przetestować dla Ciebie skrypty Bienia.  

> **[bieniu/ha-shellies-discovery](https://github.com/bieniu/ha-shellies-discovery)**
>
> Script that adds MQTT discovery support for Shellies devices - bieniu/ha-shellies-discovery

Pobierasz to repozytorium i kopiujesz folder python\_scripts do “/data/data/pl.sviete.dom/files/home/AIS”  
 ![image](https://global.discourse-cdn.com/free1/uploads/ai_speaker/original/2X/f/f84931089448e26b945707135e84fc840956b666.png)

Do pliku configuration.yaml dodajesz tylko 1 linijkę:  
 ![image](https://global.discourse-cdn.com/free1/uploads/ai_speaker/original/2X/7/7701471302975eee0b174a22a49c3fa02cbe7764.png)

Do pliku automations.yaml:

 ![image](https://global.discourse-cdn.com/free1/uploads/ai_speaker/original/2X/a/a75d20093f5ffeb2a815c1f9438d757e77bb3987.png)

W konsoli Jolki: “pm2 restart ais”  
Czekasz aż się uruchomi i odpalasz Automatyzację “Shellies Announce”.  
Efekt w moim przypadku, był taki że nic się nie pojawiło. Spojrzałem w logi HA/Jolki, a tam informacja żeby zaktualizować firmware na Shelly, zrobiłem update, ponowne uruchomienie “Shellies Announce” i:

 ![image](https://global.discourse-cdn.com/free1/uploads/ai_speaker/original/2X/1/1c75f3af4058af5ea1181ddfb06792953a443597.png)

Ponieważ jest to u mnie światło to trzeba poprawić klasę urządzenia. Potrzebny do tego jest identyfikator:  
 ![image](https://global.discourse-cdn.com/free1/uploads/ai_speaker/original/2X/6/6d46a574dfad3d92bf0d961212b7af15ad300ff9.png)

Edytuję automatyzację “Shellies Discovery”, można to zrobic przez UI, lub przez pliki(tylko potem trzeba przeładować Automatyzacje w konfiguracji HA):

 ![image](https://global.discourse-cdn.com/free1/uploads/ai_speaker/original/2X/6/619621f3869bcbf486e148343f78ae74c5d96060.png)  
Dopisałem 3 ostatnie linijki \> Zapisz.  
Uruchomienie “Shellies Announce” i gotowe:  
 ![image](https://global.discourse-cdn.com/free1/uploads/ai_speaker/original/2X/b/b5da65789b78625b72d588d4e023f66e53130a7e.png)

Teraz tylko muszę poprawić automatyzacje związane z pralnią 🙂  
Edit: ponieważ nazwałem urządzenie tak samo (pralnia) to nazwa encji się nie zmieniła, więc wszystkie automatyzacje oparte na tej encji dalej działają. 🙂

W razie problemów pisz, postaram się pomóc.

---

<div class="post-metadata">

**Autor:** ![jszkiela](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@jszkiela](https://ai-speaker.discourse.group/u/jszkiela)\
**Data wpisu:** [3 Grudzień 2020 21:49 UTC](https://ai-speaker.discourse.group/t/problem-z-shelly-dimmer-2/1036/10 "2020-12-03T21:49:26Z")

</div>

> [@Stravi](#):
>
> pm2 restart ais

Witam

Przede wszystkim dziękuje ci bardzo za pomoc. Po wykonaniu konfiguracji zgodnie z twoją instrukcją dimmer bez problemu dodał się do AIS i działa prawidłowo. Nie poprawiałem jedynie klasy urządzenia, ponieważ bez tego i tak mogę dodać kartę do sterowania dimmerem. Czy te zmiany są do czegoś niezbędne?

![obraz](https://global.discourse-cdn.com/free1/uploads/ai_speaker/original/2X/9/945f98b3cb82c4e74419d8fbd4404a54581e3e68.png)

Nie miałeś problemu z aktualizacją firmware na Shelly? chciałem dodać do AIS żarówkę Duo bulb i w logach mam komunikat o potrzebie aktualizacji.

 ![obraz](https://global.discourse-cdn.com/free1/uploads/ai_speaker/original/2X/a/a5eef521284dee5cb09a676d8e2e8f0810d06483.png)

Ale moduł twierdzi że jest aktualny. Choć z daty wynika fw że jest dość stary.

 ![obraz](https://global.discourse-cdn.com/free1/uploads/ai_speaker/original/2X/9/931531d6473e0caeee920cf4783ab59ac19c7dc0.png)

Jeszcze raz dzięki za pomoc.

Edit: Problem z aktualizacją rozwiązany. Za radą jednego z kolegów z forum Shelly zaktualizowałem żarówkę z archiwum [http://archive.shelly-faq.de/](http://archive.shelly-faq.de/) po tym bez problemu dodała się do AIS.

---

<div class="post-metadata">

**Autor:** ![jszkiela](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@jszkiela](https://ai-speaker.discourse.group/u/jszkiela)\
**Data wpisu:** [10 Grudzień 2020 23:04 UTC](https://ai-speaker.discourse.group/t/problem-z-shelly-dimmer-2/1036/11 "2020-12-10T23:04:38Z")

</div>

Dziś po pelnym resecie aplikacji AiS przestało mi działać Shellies Discovery. Czy to ma związek z aktyalizacją? (chyba zmienił sie phyton) Da się to jakoś naprawić?

Logger: homeassistant.components.automation.shellies\_discovery  
Source: components/python\_script/ **init**.py:147  
Integration: Automatyzacja (documentation, issues)  
First occurred: 23:53:58 (18 occurrences)  
Last logged: 23:56:58

```
Shellies Discovery: Error executing script. Unexpected error for call_service at pos 1: Unknown slice type: <ast.Constant object at 0xef4b1af0>
While executing automation automation.shellies_discovery
Shellies Discovery: Error executing script. Unexpected error for call_service at pos 1: Unknown slice type: <ast.Constant object at 0xefd6d460>
Shellies Discovery: Error executing script. Unexpected error for call_service at pos 1: Unknown slice type: <ast.Constant object at 0xef4786a0>
Shellies Discovery: Error executing script. Unexpected error for call_service at pos 1: Unknown slice type: <ast.Constant object at 0xee309430>

```

Traceback (most recent call last):  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/homeassistant/helpers/script.py”, line 253, in \_async\_step  
await getattr(  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/homeassistant/helpers/script.py”, line 463, in \_async\_call\_service\_step  
await self.\_async\_run\_long\_action(service\_task)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/homeassistant/helpers/script.py”, line 422, in \_async\_run\_long\_action  
long\_task.result()  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/homeassistant/core.py”, line 1490, in async\_call  
task.result()  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/homeassistant/core.py”, line 1529, in \_execute\_service  
await self.\_hass.async\_add\_executor\_job(handler.job.target, service\_call)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/concurrent/futures/thread.py”, line 52, in run  
result = self.fn(\*self.args, \*\*self.kwargs)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/homeassistant/components/python\_script/ **init**.py”, line 108, in python\_script\_service\_handler  
execute\_script(hass, call.service, call.data)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/homeassistant/components/python\_script/ **init**.py”, line 140, in execute\_script  
execute(hass, filename, source, data)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/homeassistant/components/python\_script/ **init**.py”, line 147, in execute  
compiled = compile\_restricted\_exec(source, filename=filename)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/RestrictedPython/compile.py”, line 90, in compile\_restricted\_exec  
return \_compile\_restricted\_mode(  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/RestrictedPython/compile.py”, line 68, in _compile\_restricted\_mode  
policy\_instance.visit(c\_ast)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/ast.py”, line 407, in visit  
return visitor(node)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/RestrictedPython/transformer.py”, line 1437, in visit\_Module  
node = self.node\_contents\_visit(node)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/RestrictedPython/transformer.py”, line 535, in node\_contents\_visit  
return super(RestrictingNodeTransformer, self).generic\_visit(node)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/ast.py”, line 483, in generic\_visit  
value = self.visit(value)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/ast.py”, line 407, in visit  
return visitor(node)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/RestrictedPython/transformer.py”, line 1310, in visit\_FunctionDef  
node = self.node\_contents\_visit(node)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/RestrictedPython/transformer.py”, line 535, in node\_contents\_visit  
return super(RestrictingNodeTransformer, self).generic\_visit(node)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/ast.py”, line 483, in generic\_visit  
value = self.visit(value)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/ast.py”, line 407, in visit  
return visitor(node)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/RestrictedPython/transformer.py”, line 1394, in visit\_Return  
return self.node\_contents\_visit(node)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/RestrictedPython/transformer.py”, line 535, in node\_contents\_visit  
return super(RestrictingNodeTransformer, self).generic\_visit(node)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/ast.py”, line 492, in generic\_visit  
new\_node = self.visit(old\_value)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/ast.py”, line 407, in visit  
return visitor(node)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/RestrictedPython/transformer.py”, line 873, in visit\_Call  
node = self.node\_contents\_visit(node)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/RestrictedPython/transformer.py”, line 535, in node\_contents\_visit  
return super(RestrictingNodeTransformer, self).generic\_visit(node)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/ast.py”, line 483, in generic\_visit  
value = self.visit(value)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/ast.py”, line 407, in visit  
return visitor(node)  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/RestrictedPython/transformer.py”, line 966, in visit\_Subscript  
args=[node.value, self.transform\_slice(node.slice)],  
File “/data/data/pl.sviete.dom/files/usr/lib/python3.9/site-packages/RestrictedPython/transformer.py”, line 390, in transform\_slice  
raise NotImplementedError(“Unknown slice type: {0}”.format(slice_))  
NotImplementedError: Unknown slice type: \<ast.Constant object at 0xef83a820\>

---

<div class="post-metadata">

**Autor:** ![jszkiela](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@jszkiela](https://ai-speaker.discourse.group/u/jszkiela)\
**Data wpisu:** [11 Grudzień 2020 06:40 UTC](https://ai-speaker.discourse.group/t/problem-z-shelly-dimmer-2/1036/12 "2020-12-11T06:40:23Z")

</div>

> [@jszkiela](#):
>
> `Shellies Discovery: Error executing script. Unexpected error for call_service at pos 1: Unknown slice type:`

Z tego co widzę to problem jest już znany

> <https://github.com/home-assistant/core/issues/44086>
>
> \<!-- READ THIS FIRST:
> - If you need additional help with this template, pleas…e refer to https://www.home-assistant.io/help/reporting\_issues/
> - Make sure you are running the latest version of Home Assistant before reporting an issue: https://github.com/home-assistant/core/releases
> - Do not report issues for integrations if you are using custom components or integrations.
> - Provide as many details as possible. Paste logs, configuration samples and code into the backticks.
> DO NOT DELETE ANY TEXT from this template! Otherwise, your issue may be closed without comment.
> \--\>
> \## The problem
> \<!-- 
> Describe the issue you are experiencing here to communicate to the
> maintainers. Tell us what you were trying to do and what happened.
> \--\>
> The \`python\_script\` component scripts return an error when accessing an item of the list. The issue only occurs with Python 3.9.
> 
> Sample script that generates the error:
> \`\`\`python
> my\_list = \["one", "two"\]
> one = my\_list\[0\]
> \`\`\`
> \## Environment
> \<!--
> Provide details about the versions you are using, which helps us to reproduce
> and find the issue quicker. Version information is found in the
> Home Assistant frontend: Configuration -\> Info.
> \--\>
> 
> \- Home Assistant Core release with the issue: 1.0.0b2/0.118.5
> \- Last working Home Assistant Core release (if known): 
> \- Operating environment (OS/Container/Supervised/Core): Debian 10, Core, venv, Python 3.9.0 
> \- Integration causing this issue: python\_script
> \- Link to integration documentation on our website: https://www.home-assistant.io/integrations/python\_script/
> 
> \## Problem-relevant \`configuration.yaml\`
> \<!--
> An example configuration that caused the problem for you. Fill this out even
> if it seems unimportant to you. Please be sure to remove personal information
> like passwords, private URLs and other credentials.
> \--\>
> 
> \`\`\`yaml
> 
> \`\`\`
> 
> \## Traceback/Error logs
> \<!--
> If you come across any trace or error logs, please provide them.
> \--\>
> 
> \`\`\`txt
> 2020-12-09 20:18:26 ERROR (MainThread) \[homeassistant.components.websocket\_api.http.connection\] \[139713274670624\] Unknown slice type: \<ast.Constant object at 0x7f1183198ee0\>
> Traceback (most recent call last):
> File "/home/maciek/.virtualenvs/hass-py39/lib/python3.9/site-packages/homeassistant/components/websocket\_api/commands.py", line 135, in handle\_call\_service
> await hass.services.async\_call(
> File "/home/maciek/.virtualenvs/hass-py39/lib/python3.9/site-packages/homeassistant/core.py", line 1445, in async\_call
> task.result()
> File "/home/maciek/.virtualenvs/hass-py39/lib/python3.9/site-packages/homeassistant/core.py", line 1484, in \_execute\_service
> await self.\_hass.async\_add\_executor\_job(handler.job.target, service\_call)
> File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
> result = self.fn(\*self.args, \*\*self.kwargs)
> File "/home/maciek/.virtualenvs/hass-py39/lib/python3.9/site-packages/homeassistant/components/python\_script/\_\_init\_\_.py", line 108, in python\_script\_service\_handler
> execute\_script(hass, call.service, call.data)
> File "/home/maciek/.virtualenvs/hass-py39/lib/python3.9/site-packages/homeassistant/components/python\_script/\_\_init\_\_.py", line 140, in execute\_script
> execute(hass, filename, source, data)
> File "/home/maciek/.virtualenvs/hass-py39/lib/python3.9/site-packages/homeassistant/components/python\_script/\_\_init\_\_.py", line 147, in execute
> compiled = compile\_restricted\_exec(source, filename=filename)
> File "/home/maciek/.virtualenvs/hass-py39/lib/python3.9/site-packages/RestrictedPython/compile.py", line 90, in compile\_restricted\_exec
> return \_compile\_restricted\_mode(
> File "/home/maciek/.virtualenvs/hass-py39/lib/python3.9/site-packages/RestrictedPython/compile.py", line 68, in \_compile\_restricted\_mode
> policy\_instance.visit(c\_ast)
> File "/usr/local/lib/python3.9/ast.py", line 407, in visit
> return visitor(node)
> File "/home/maciek/.virtualenvs/hass-py39/lib/python3.9/site-packages/RestrictedPython/transformer.py", line 1437, in visit\_Module
> node = self.node\_contents\_visit(node)
> File "/home/maciek/.virtualenvs/hass-py39/lib/python3.9/site-packages/RestrictedPython/transformer.py", line 535, in node\_contents\_visit
> return super(RestrictingNodeTransformer, self).generic\_visit(node)
> File "/usr/local/lib/python3.9/ast.py", line 483, in generic\_visit
> value = self.visit(value)
> File "/usr/local/lib/python3.9/ast.py", line 407, in visit
> return visitor(node)
> File "/home/maciek/.virtualenvs/hass-py39/lib/python3.9/site-packages/RestrictedPython/transformer.py", line 1044, in visit\_Assign
> node = self.node\_contents\_visit(node)
> File "/home/maciek/.virtualenvs/hass-py39/lib/python3.9/site-packages/RestrictedPython/transformer.py", line 535, in node\_contents\_visit
> return super(RestrictingNodeTransformer, self).generic\_visit(node)
> File "/usr/local/lib/python3.9/ast.py", line 492, in generic\_visit
> new\_node = self.visit(old\_value)
> File "/usr/local/lib/python3.9/ast.py", line 407, in visit
> return visitor(node)
> File "/home/maciek/.virtualenvs/hass-py39/lib/python3.9/site-packages/RestrictedPython/transformer.py", line 966, in visit\_Subscript
> args=\[node.value, self.transform\_slice(node.slice)\],
> File "/home/maciek/.virtualenvs/hass-py39/lib/python3.9/site-packages/RestrictedPython/transformer.py", line 390, in transform\_slice
> raise NotImplementedError("Unknown slice type: {0}".format(slice\_))
> NotImplementedError: Unknown slice type: \<ast.Constant object at 0x7f1183198ee0\>
> \`\`\`
> 
> \## Additional information

Da się go jakoś obejść problem żeby można było integrować moduły Shelly z AiS?

---

<div class="post-metadata">

**Autor:** ![Medykkforek](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@Medykkforek](https://ai-speaker.discourse.group/u/Medykkforek)\
**Data wpisu:** [14 Grudzień 2020 21:40 UTC](https://ai-speaker.discourse.group/t/problem-z-shelly-dimmer-2/1036/13 "2020-12-14T21:40:26Z")

</div>

Mi działa normalnie a ktoś próbować usunąć indodac jeszcze raz ? Usunołem i dodałem shelly

---

<div class="post-metadata">

**Autor:** ![jszkiela](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@jszkiela](https://ai-speaker.discourse.group/u/jszkiela)\
**Data wpisu:** [14 Grudzień 2020 21:49 UTC](https://ai-speaker.discourse.group/t/problem-z-shelly-dimmer-2/1036/14 "2020-12-14T21:49:02Z")

</div>

A jak integrowałeś? Bo mi też już działa tylko zapomniałem napisać jak rozwiązałem a mianowicie w najnowszej wersji AiS działa perfekcyjnie wbudowana integracja (w poprzedniej prosiła o wybudzenie urządzeń bateryjnych i tak w kółko).

---

<div class="post-metadata">

**Autor:** ![Medykkforek](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@Medykkforek](https://ai-speaker.discourse.group/u/Medykkforek)\
**Data wpisu:** [15 Grudzień 2020 06:45 UTC](https://ai-speaker.discourse.group/t/problem-z-shelly-dimmer-2/1036/15 "2020-12-15T06:45:18Z")

</div>

Stravi pomógł wgrać mi integrację

---

<div class="post-metadata">

**Autor:** ![Stravi](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Stravi](https://ai-speaker.discourse.group/u/Stravi)\
**Data wpisu:** [15 Grudzień 2020 07:54 UTC](https://ai-speaker.discourse.group/t/problem-z-shelly-dimmer-2/1036/16 "2020-12-15T07:54:30Z")

</div>

Fix jest w HA w wersji: 2020.12.1, czyli aktualnie Beta Jolki o imieniu Bartek 🙂

---

<div class="post-metadata">

**Autor:** ![Medykkforek](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@Medykkforek](https://ai-speaker.discourse.group/u/Medykkforek)\
**Data wpisu:** [14 Styczeń 2021 21:29 UTC](https://ai-speaker.discourse.group/t/problem-z-shelly-dimmer-2/1036/17 "2021-01-14T21:29:34Z")

</div>

Ok jest integracja shelly na bramce podaje się tylko IP przełącznika i wszystko działa
