<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Archives des light - La programmation sur le web</title>
	<atom:link href="https://programmation.surleweb-france.fr/tag/light/feed/" rel="self" type="application/rss+xml" />
	<link>https://programmation.surleweb-france.fr/tag/light/</link>
	<description>La programmation gratuite pour tous</description>
	<lastBuildDate>Sun, 03 Apr 2022 08:32:10 +0000</lastBuildDate>
	<language>fr-FR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2023/08/cropped-19518430-icone-de-programmation-pour-votre-site-web-mobile-presentation-et-conception-de-logo-gratuit-vectoriel.jpg?fit=32%2C32&#038;ssl=1</url>
	<title>Archives des light - La programmation sur le web</title>
	<link>https://programmation.surleweb-france.fr/tag/light/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">176210735</site>	<item>
		<title>Home assistant, modifier le type d&#8217;un module</title>
		<link>https://programmation.surleweb-france.fr/home-assistant-modifier-le-type-dun-module/</link>
					<comments>https://programmation.surleweb-france.fr/home-assistant-modifier-le-type-dun-module/#respond</comments>
		
		<dc:creator><![CDATA[Zigomato]]></dc:creator>
		<pubDate>Sun, 19 Dec 2021 16:47:41 +0000</pubDate>
				<category><![CDATA[Domotique]]></category>
		<category><![CDATA[device]]></category>
		<category><![CDATA[Home Assistant]]></category>
		<category><![CDATA[light]]></category>
		<category><![CDATA[mini]]></category>
		<category><![CDATA[modifier]]></category>
		<category><![CDATA[sonoff]]></category>
		<category><![CDATA[switch]]></category>
		<category><![CDATA[type]]></category>
		<category><![CDATA[zigbee]]></category>
		<guid isPermaLink="false">https://programmation.surleweb-france.fr/?p=1290</guid>

					<description><![CDATA[<p>La modification d'un type de module pour qu'il soit reconnu différemment que son module par défaut est rapidesur Home Assistant.</p>
<p class="continue-reading-button"> <a class="continue-reading-link" href="https://programmation.surleweb-france.fr/home-assistant-modifier-le-type-dun-module/">Continuer la lecture<i class="crycon-right-dir"></i></a></p>
<p>L’article <a href="https://programmation.surleweb-france.fr/home-assistant-modifier-le-type-dun-module/">Home assistant, modifier le type d&rsquo;un module</a> est apparu en premier sur <a href="https://programmation.surleweb-france.fr">La programmation sur le web</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Afin de mettre en place ma gestion automatique de mon chauffage électrique d&rsquo;appoint dans la maison, j&rsquo;ai dû utiliser des modules Sonoff accompagnés de diode pour gestion du fil pilote, cela fera l&rsquo;objet d&rsquo;un article.</p>



<p>Une de mes difficultés lors de la mise en place de cela a été que mon module, une fois ajouté à Home Assistant était déclaré comme une lumière. J&rsquo;ai cherché sur le net (pas mal de temps) pour modifier le type du module dans ZHA.</p>



<p>Cet article est valable si tu utilises l&rsquo;intégration <a href="https://www.home-assistant.io/integrations/zha/" target="_blank" rel="noreferrer noopener">ZHA </a>et une passerelle <a href="https://www.inpact-hardware.com/article/2300/domotique-a-decouverte-protocole-zigbee" target="_blank" rel="noreferrer noopener">Zigbee</a>. Dans mon cas, avec mon <a href="https://raspberry-pi.fr/" target="_blank" rel="noreferrer noopener">Raspberry</a>, j&rsquo;utilise une PiGate.</p>



<h2 class="wp-block-heading">Ce dont tu as besoin</h2>



<p>J&rsquo;imagine qu&rsquo;en venant ici, soit tu as déjà ce qu&rsquo;il faut, soit tu cherches, je mets de côté le Raspberry, qui peut être remplacé par une toute autre solution.</p>



<p>J&rsquo;ai pris le module interrupteur Zigbee de Sonoff sur ce <a href="https://amzn.to/3mespDq" target="_blank" rel="noreferrer noopener">site</a>. </p>



<h2 class="wp-block-heading">Ajout du module avec ZHA</h2>



<p>ZHA est une intégration permettant de gérer les équipements Zigbee accessible à partir d&rsquo;une passerelle. Tu peux suivre ce <a href="https://programmation.surleweb-france.fr/installer-et-configurer-la-pizigate-sur-pi-4/" target="_blank" rel="noreferrer noopener">lien</a>. </p>



<p>L&rsquo;intégration se fait comme tout autre équipement.</p>



<h2 class="wp-block-heading">Modifier le type du module</h2>



<p>Comme je l&rsquo;ai dit au début de page, une fois installé, mon module était considéré comme une lumière. Pour mes automatisations, j&rsquo;avais besoin d&rsquo;interrupteur.</p>



<p>Dans le fichier <em>configuration.yaml</em>, tu ajouteras :</p>



<pre class="EnlighterJSRAW" data-enlighter-language="yaml" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">zha:
  device_config:
    00:12:4b:00:24:c2:03:4e-1:    
      type: "switch"</pre>



<p>Pour l&rsquo;explication, l&rsquo;adresse est constituée de deux parties, la première est l&rsquo;identifiant et la seconde le <em>endpoint</em>.</p>



<p>Pour trouver l&rsquo;identifiant, dans Home Assistant, recherche ton appareil, dans <strong><em>Zigbee Info</em></strong>, tu trouveras <em>IEEE </em>(l&rsquo;identifiant) :</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img fetchpriority="high" decoding="async" width="311" height="339" src="//i1.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2021/12/image.png" alt="" class="wp-image-1291" srcset="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2021/12/image.png?w=311&amp;ssl=1 311w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2021/12/image.png?resize=275%2C300&amp;ssl=1 275w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2021/12/image.png?resize=138%2C150&amp;ssl=1 138w" sizes="(max-width: 311px) 100vw, 311px" /></figure></div>



<p>Pour le <strong><em>endpoint</em></strong>, cliques sur Informations Zigbee, dans le popup qui s&rsquo;affichera, tu trouveras le <strong><em>endpoint </em></strong>:</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img decoding="async" width="333" height="185" src="//i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2021/12/image-1.png" alt="" class="wp-image-1292" srcset="https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2021/12/image-1.png?w=333&amp;ssl=1 333w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2021/12/image-1.png?resize=300%2C167&amp;ssl=1 300w, https://i0.wp.com/programmation.surleweb-france.fr/wp-content/uploads/2021/12/image-1.png?resize=150%2C83&amp;ssl=1 150w" sizes="(max-width: 333px) 100vw, 333px" /></figure></div>



<p>La dernière ligne permet d&rsquo;indiquer comment Home Assistant doit utiliser le module, dans mon cas <strong><em>Switch</em></strong>.</p>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Voici comment modifier le type d&rsquo;un module installé.</p>
<p>L’article <a href="https://programmation.surleweb-france.fr/home-assistant-modifier-le-type-dun-module/">Home assistant, modifier le type d&rsquo;un module</a> est apparu en premier sur <a href="https://programmation.surleweb-france.fr">La programmation sur le web</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://programmation.surleweb-france.fr/home-assistant-modifier-le-type-dun-module/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1290</post-id>	</item>
	</channel>
</rss>
